improvements for libcsp cargo builder

This commit is contained in:
2024-06-01 23:21:50 +02:00
parent 28cc72de24
commit 215364a6a5
10 changed files with 45 additions and 29 deletions

View File

@@ -9,4 +9,4 @@ edition = "2021"
libcsp = { version = "0.1", path = ".." }
[build-dependencies]
libcsp-cargo-build = "0.1"
libcsp-cargo-build = { version = "0.2", path = "../libcsp-cargo-build" }

View File

@@ -1,4 +1,4 @@
// This file was auto-generated by libcsp-cargo-build v0.1.0
// This file was auto-generated by libcsp-cargo-build v0.2.0
#define CSP_POSIX 1
#define CSP_ZEPHYR 0

View File

@@ -1,4 +1,4 @@
// This file was auto-generated by libcsp-cargo-build v0.1.0
// This file was auto-generated by libcsp-cargo-build v0.2.0
pub const CSP_CONN_RXQUEUE_LEN: usize = 16;
pub const CSP_QFIFO_LEN: usize = 16;
pub const CSP_PORT_MAX_BIND: usize = 16;

View File

@@ -11,7 +11,8 @@ fn main() {
// This helper structure will take care of the majority of work to compile libcsp using the
// cc crate.
let mut csp_builder = Builder::new(PathBuf::from(libcsp_path), PathBuf::from(&out_dir));
let mut csp_builder = Builder::new(PathBuf::from(libcsp_path), PathBuf::from(&out_dir))
.expect("creating libcsp builder failed");
// A lot of spam we are not interested in usually.
csp_builder.compiler_warnings = false;