https://github.com/lu-zero/cdylib-link-lines
Helper to build correctly cdylibs
https://github.com/lu-zero/cdylib-link-lines
cargo rust
Last synced: about 1 year ago
JSON representation
Helper to build correctly cdylibs
- Host: GitHub
- URL: https://github.com/lu-zero/cdylib-link-lines
- Owner: lu-zero
- License: mit
- Created: 2019-06-01T14:21:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T12:05:25.000Z (over 2 years ago)
- Last Synced: 2024-08-09T00:26:40.054Z (almost 2 years ago)
- Topics: cargo, rust
- Language: Rust
- Size: 9.77 KB
- Stars: 14
- Watchers: 3
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# link-line helper to build correct cdylibs
[](LICENSE)
## Supported targets
- Linux and Android
- macOS and iOS
- Windows (gnu)
## Usage
### build.rs
Add the crate to your [build-dependencies](https://doc.rust-lang.org/cargo/reference/manifest.html#dependency-sections), in your `build.rs`, call `metabuild()`.
``` toml
[build-dependencies]
cdylib-link-lines = "0.1"
```
``` rust
fn main() {
cdylib_link_lines::metabuild();
}
```
### metabuild
If you are using the `metabuild` [unstable feature](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#metabuild)
``` toml
cargo-features = ["metabuild"]
[package]
name = "mypackage"
...
metabuild = ["cdylib-link-lines"]
[build-dependencies]
cdylib-link-lines = "0.1"
```
## Credits
Helper spun off [crav1e](https://github.com/lu-zero/crav1e), contains code written by Luca Barbato and Derek Buitenhuis.
Synchronized with the [cargo-c](https://github.com/lu-zero/cargo-c) 0.9 logic thanks to Ivan Enderlin.