Beast: Enable non-header-only compilation of Beast

Created on 4 May 2018  路  6Comments  路  Source: boostorg/beast

ASIO supports non-header-only to speed up compilation, Beast should follow this pattern.

Actions required:

  • *.hpp impl files should contain only template code
  • *.ipp impl files should contain code which can be compiled in a separate TU
Stale

Most helpful comment

Yeah, I looked through the .ipp files and there isn't really much that would go into a translation unit.

All 6 comments

Good to know

This issue has been open for a while with no activity, has it been resolved?

FYI this isnt about speed but about
supporting a use-case of compiling into shared libraries.

https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/using.html#boost_asio.using.optional_separate_compilation

Also, afaik, this system in asio is more complicated because there's a great deal of OS abstraction (os specific code) in asio and also there's hidden helpers via static initializers that don't play nice in a shared library context on all platforms.

Given this, I believe the use case would simply become:

  • Asio is shared lib.
  • Beast doesn't care.
  • Everyone lives happily ever after.

I guess what I'm saying is don't take asio's structure or compilation options as a standard to follow. It's very asio-specific and beast != asio.

Also I'd be interested to see the use case where someone is constantly editing and using beast and incurring a significant performance penalty. Recent compiler/toolchain benchmarks are pretty stellar and so are standard processors these days. :)

Yeah, I looked through the .ipp files and there isn't really much that would go into a translation unit.

This issue has been open for a while with no activity, has it been resolved?

It looks like this issue has either been abandoned or resolved so I will go ahead and close it. Feel free to re-open this issue if you feel it needs attention, or open new issues as needed. Thanks!

Was this page helpful?
0 / 5 - 0 ratings