https://github.com/thealgorythm/cargo-dylib
A cargo wrapper POC for faster compilation of dependencies as dynamic libraries.
https://github.com/thealgorythm/cargo-dylib
cargo cargo-subcommand rust
Last synced: 9 months ago
JSON representation
A cargo wrapper POC for faster compilation of dependencies as dynamic libraries.
- Host: GitHub
- URL: https://github.com/thealgorythm/cargo-dylib
- Owner: TheAlgorythm
- License: gpl-3.0
- Created: 2022-10-31T14:38:05.000Z (about 3 years ago)
- Default Branch: MAIN
- Last Pushed: 2023-09-21T08:56:44.000Z (over 2 years ago)
- Last Synced: 2025-04-24T06:04:14.044Z (9 months ago)
- Topics: cargo, cargo-subcommand, rust
- Language: Rust
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cargo-dylib
A cargo wrapper proof of concept for faster compilation of dependencies as dynamic libraries.
For incremental builds the linking of dynamic libraries is much faster then building a static binary as described in [this](https://robert.kra.hn/posts/2022-09-09-speeding-up-incremental-rust-compilation-with-dylibs/) blog post.
It works a bit like [`cargo-add-dynamic`](https://lib.rs/crates/cargo-add-dynamic), but doesn't alter the `Cargo.toml` in order to have a single source of truth for both fast incremental debug builds and release builds.
It does so by reading the `Cargo.toml`, laying out a shadow project structure and executes the command with a pointer to the shadow metadata.
As this is just a proof of concept it won't generate dylibs recursively yet.
## TODOs
- [ ] Workspace support
- [ ] Treat shared subdependencies as dylibs (recursive)