d2-rs 0.1.7

The d2-rs command-line tool, a Rust port of D2's d2cli package.
Documentation
1
2
3
4
5
6
7
8
9
10
11
// SPDX-License-Identifier: MPL-2.0
fn main() {
    let include = std::env::var_os("DEP_MIMALLOC_INCLUDE_DIR")
        .expect("libmimalloc-sys must provide its matching mimalloc header");
    println!("cargo:rerun-if-changed=src/allocator.c");
    println!("cargo:rerun-if-env-changed=DEP_MIMALLOC_INCLUDE_DIR");
    cc::Build::new()
        .include(include)
        .file("src/allocator.c")
        .compile("d2_rs_allocator");
}