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

Dynamic libraries (dll/dylib) for fast iteration #13

Closed
3 tasks
repi opened this issue Apr 1, 2019 · 1 comment
Closed
3 tasks

Dynamic libraries (dll/dylib) for fast iteration #13

repi opened this issue Apr 1, 2019 · 1 comment
Labels
cargo todo Issue has not been fleshed out yet

Comments

@repi
Copy link
Contributor

repi commented Apr 1, 2019

In big C++ game engines we typically build almost everything as DLLs for fast iteration both for debug and release performance builds, while for the final release builds switch and link everything together statically.

We are already seeing significant long linking times (30+ seconds on Windows) due to Rust not really supporting dynamic Rust libraries and having to use static linking for everything and expect this to continue to increase to unacceptable levels.

TODO: Describe more!

Related umbrella issue in rust-gamedev WG: rust-gamedev/wg#50

  • TODO: Can specify libraries as dylib but not transitively.
  • How should dynamic linking work in Rust? · Issue #3573 · rust-lang/cargo
  • Windows 64k symbol issue
    - If you build a dylib on Windows it can easily stop linking due to including every dependency as an exported symbol and running into Windows limitation of max 65535 symbols.
    - Does this happen when using cdylib?
    - TODO: Link issue
@repi
Copy link
Contributor Author

repi commented Oct 25, 2020

Linking times for our engine with ~550 Rust crate dependencies (and some being fairly large C++ dependencies like PhysX) is around 7 seconds on Windows with incremental release builds and LLD as a linker (which really should be the default on windows: #15). Compared to 30 seconds when I originally filed this.

That is actually pretty decent, and while we would want it to be even faster, this is a fairly large issue and potential solution for it and probably too much effort, so closing this for now.

@repi repi closed this as completed Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cargo todo Issue has not been fleshed out yet
Projects
None yet
Development

No branches or pull requests

2 participants