Crates.io | librarian |
lib.rs | librarian |
version | 0.2.3 |
source | src |
created_at | 2020-06-18 19:58:20.793026 |
updated_at | 2020-10-22 09:50:39.818665 |
description | A crate for downloading and linking to non-rust libraries from app build scripts |
homepage | |
repository | https://github.com/pavlukivan/librarian/ |
max_upload_size | |
id | 255467 |
size | 24,462 |
When I started using C libraries in Rust on Windows, what bothered me a lot was the fact that while normally building a crate just requires cargo build
, if you have to link to a C library and especially if you have to use a DLL, the process becomes more complicated. To eliminate that, I made this crate for myself and am publishing it in hope it will be useful to others.
Do note that right now the project is only tested in a limited amount of environments, so I don't guarantee it will work for you, and I don't guarantee backwards compatibility. However if it doesn't work for you you're welcome to contribute!
It probably isn't feasible to integrate with all the different build systems there are to allow automatically fetching source and building it. While it makes me appreciate the Rust build system, it means automatic downloading will only work for prebuilt libraries.
cargo:rustc-link-search
)To use Librarian in your build script, add the following to your Cargo.toml:
[build-dependencies]
librarian = "*"
TL;DR do whatever you want
Licensed under either the BSD Zero Clause License (https://opensource.org/licenses/0BSD), the Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0) or the MIT License (http://opensource.org/licenses/MIT), at your choice.