From 79726fdf646c92f1d4e0f1f63928b8fff8d19fdd Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 4 Dec 2019 10:17:05 -0800 Subject: [PATCH] Add build script --- Cargo.lock | 16 ++++++++++++++++ Cargo.toml | 3 ++- build.rs | 13 +++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 Cargo.lock create mode 100644 build.rs diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..b81d0e0 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,16 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "cc" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "rust-most" +version = "0.1.0" +dependencies = [ + "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[metadata] +"checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" diff --git a/Cargo.toml b/Cargo.toml index 596fe9f..e5f31d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,4 +6,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[build-dependencies] +cc = "1.0.47" diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..c35693b --- /dev/null +++ b/build.rs @@ -0,0 +1,13 @@ + +use cc::Build; +use std::path::Path; + +fn main() { + println!("Running build script"); + + let most_src = Path::new("vendor/most-5.1.0"); + + Build::new() + .include(most_src) + .compile("most"); +}