https://github.com/kijewski/prefer-dynamic2
https://github.com/kijewski/prefer-dynamic2
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kijewski/prefer-dynamic2
- Owner: Kijewski
- License: apache-2.0
- Created: 2025-01-22T18:37:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-22T19:41:00.000Z (over 1 year ago)
- Last Synced: 2025-04-19T19:08:57.965Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
- Security: SECURITY.md
Awesome Lists containing this project
README
# prefer-dynamic2
[](https://github.com/Kijewski/prefer-dynamic2/actions/workflows/ci.yml)
[](https://crates.io/crates/prefer-dynamic2)
Simple rust crate that copies the pre-compiled dynamic `std` library to your target directory.
This is a convenience intended for programs that make use of `dylib` crates, or get compiled
with `-Cprefer-dynamic`.
## Usage
Add to your `Cargo.toml`:
```toml
[target.'cfg(any(unix, windows))'.dependencies]
prefer-dynamic2 = "0.2.0"
[target.'cfg(any(unix, windows))'.dev-dependencies]
prefer-dynamic2 = "0.2.0"
```
Create or edit `.cargo/config.toml` in the manifest root of your project
(create the folder `.cargo` if it does not exists), and add:
```toml
[target.'cfg(any(unix, windows))']
rustflags = ["-Cprefer-dynamic=yes", "-Crpath"]
```
## License
This software is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
All contributions must be dual licensed Apache2/MIT unless otherwise stated.
This project is a fork of the fine work of William Venner:
[`prefer-dynamic`](https://github.com/WilliamVenner/prefer-dynamic).