#build-dependencies #build-system #native #configure #support #emscripten #makefile

build autotools

A build dependency to build native libraries that use configure&make-style build systems

12 releases

Uses old Rust 2015

0.2.6 Feb 20, 2023
0.2.5 Feb 27, 2022
0.2.4 Dec 13, 2021
0.2.3 May 7, 2021
0.1.2 Mar 11, 2018

#38 in Build Utils

Download history 37674/week @ 2023-11-24 40208/week @ 2023-12-01 42460/week @ 2023-12-08 38439/week @ 2023-12-15 28072/week @ 2023-12-22 29977/week @ 2023-12-29 48071/week @ 2024-01-05 45862/week @ 2024-01-12 51541/week @ 2024-01-19 45002/week @ 2024-01-26 44547/week @ 2024-02-02 38160/week @ 2024-02-09 38636/week @ 2024-02-16 43598/week @ 2024-02-23 40398/week @ 2024-03-01 19411/week @ 2024-03-08

148,785 downloads per month
Used in 200 crates (36 directly)

MIT license

31KB
483 lines

autotools/configure&make support for build.rs

LICENSE dependency status crates.io docs.rs Actions Status

A build dependency to compile a native library that uses autotools or a compatible configure script + make.

It is based on cmake-rs and the API tries to be as similar as possible to it.

For Emscripten targets like "wasm32-unknown-emscripten", configure and make invocations are passed as arguments to emconfigure and emmake respectively as described in the Emscripten docs.

# Cargo.toml
[build-dependencies]
autotools = "0.2"
// build.rs
use autotools;

// Build the project in the path `foo` and installs it in `$OUT_DIR`
let dst = autotools::build("foo");

// Simply link the library without using pkg-config
println!("cargo:rustc-link-search=native={}", dst.display());
println!("cargo:rustc-link-lib=static=foo");
// build.rs
use autotools::Config;

let dst = Config::new("foo")
    .reconf("-ivf")
    .enable("feature", None)
    .with("dep", None)
    .disable("otherfeature", None)
    .without("otherdep", None)
    .cflag("-Wall")
    .build();

Dependencies

~170KB