1 个稳定版本

使用旧的 Rust 2015

1.0.0 2017年6月16日

#19#path-buf

Download history 34/week @ 2024-03-11 26/week @ 2024-03-18 29/week @ 2024-03-25 61/week @ 2024-04-01 19/week @ 2024-04-08 35/week @ 2024-04-15 32/week @ 2024-04-22 24/week @ 2024-04-29 30/week @ 2024-05-06 29/week @ 2024-05-13 27/week @ 2024-05-20 23/week @ 2024-05-27 24/week @ 2024-06-03 20/week @ 2024-06-10 29/week @ 2024-06-17 25/week @ 2024-06-24

101 每月下载量
3crate(2个直接)中使用

MIT 许可证

2KB

构建示例

.
├── 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')

无运行时依赖