Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any possibility to make dependency on Boost not required(like ASIO does)? #2843

Open
TheStormN opened this issue Mar 27, 2024 · 10 comments
Open

Comments

@TheStormN
Copy link

Version of Beast

353

Steps necessary to reproduce the problem

It is a very nice thing that ASIO can be used without Boost. Given that Beast manly needs functionality from ASIO I think the request of such support should be not that far fetched.

All relevant compiler information

N/A

@ashtum
Copy link
Collaborator

ashtum commented Mar 27, 2024

This is not planned, as there is an ongoing effort to make Boost modular. Therefore, you would only need to install the Boost libraries that Beast depends on.

@TheStormN
Copy link
Author

By looking at the Beast dependencies, even if Boost becomes modular, it would still require quite a lot of stuff:

target_link_libraries(boost_beast
  INTERFACE
    Boost::asio
    Boost::assert
    Boost::bind
    Boost::config
    Boost::container
    Boost::core
    Boost::endian
    Boost::intrusive
    Boost::logic
    Boost::mp11
    Boost::optional
    Boost::smart_ptr
    Boost::static_assert
    Boost::static_string
    Boost::system
    Boost::throw_exception
    Boost::type_traits
    Boost::utility
    Boost::winapi
)

Most of these are already available in C++17, so I would really appreciate if I don't need to bring dozen of additional stuff which C++ supports anyway.

@TheStormN
Copy link
Author

@ashtum If I would spend effort when I have free time in making the library to be like ASIO in Boost compatibility regard, will the PRs be welcomed? Of course the standalone version will require newer C++ standard than the one which Boost requires.

@ashtum
Copy link
Collaborator

ashtum commented Jul 31, 2024

Sorry for the late reply; I missed the notification. Replacing the dependencies and maintaining two versions wouldn't be trivial, especially if you want to support C++11. What is the motivating use case for this change? Modular Boost is not far off, and each library would receive only what it needs, rather than the entire Boost libraries.

@TheStormN
Copy link
Author

TheStormN commented Jul 31, 2024

Even if boost becomes modular, you are still using quite a lot of it. I don't plan to target C++11. Perhaps C++17. Older C++ versions will be only supported by the Boost variant.

@ashtum
Copy link
Collaborator

ashtum commented Jul 31, 2024

Yes, considering that Beast targets C++11, it had to use more facilities from Boost. However, how is this an issue, and what would be the benefits of reducing their usage?

@TheStormN
Copy link
Author

I guess the same benefits as standalone ASIO. No need to bring tons of 3rd party stuff(even if modular) given the C++ version we are using already have these facilities.

@vinniefalco
Copy link
Member

The C++ Standard cannot even connect to the Internet...

@ashtum
Copy link
Collaborator

ashtum commented Jul 31, 2024

I guess the same benefits as standalone ASIO. No need to bring tons of 3rd party stuff(even if modular) given the C++ version we are using already have these facilities.

ASIO has minimal dependencies on Boost, and from the start, Chris has aimed to implement most of the facilities within ASIO itself. It's important to consider that, back then, there were no package managers for C++, and people generally disliked having dependencies.

@TheStormN
Copy link
Author

And now we have several package managers and all of them with their quirks or missing packages. :)

In general I think a Boost only version would be acceptable if there are no Boost types leaking into public headers, so people don't end up using them by incident, but I believe this is also not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants