1 stable release
Uses old Rust 2015
1.0.0 | Jun 16, 2017 |
---|
#14 in #│
83 downloads per month
Used in 3 crates
(2 directly)
2KB
Build Example
.
├── build.rs
├── Cargo.toml
├── clib
│ ├── meson.build
│ ├── squid.h
│ └── squid.c
└── src
└── lib.rs
build.rs:
extern crate meson;
use std::env;
use std::path::PathBuf;
fn main() {
let build_path = PathBuf::from(env::var("OUT_DIR").unwrap());
build_path.join("build");
let build_path = build_path.to_str().unwrap();
println!("cargo:rustc-link-lib=squid");
println!("cargo:rustc-link-search=native={}", build_path);
meson::build("clib", build_path);
}
Cargo.toml:
# ...
[build-dependencies]
meson = "1.0.0"
meson.build:
project('squid', 'c')
shared_library('squid', 'squid.c')