From 7d9444e36ec6842d47a11005af18181c364be9f1 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Mon, 4 Nov 2024 11:33:34 -0700 Subject: [PATCH] fixup clippy --- .cargo/config.toml | 2 -- .github/workflows/build-and-deploy-docs.yml | 4 --- Cargo.lock | 36 ++++++++++----------- design-docs/src/mdbook/book.toml | 2 -- dpdk-sysroot-helper/src/lib.rs | 3 +- justfile | 4 +-- scratch/Cargo.toml | 3 +- scratch/build.rs | 2 +- scripts/dpdk-sys.env | 2 +- 9 files changed, 24 insertions(+), 34 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 74b272a9..344995e9 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,7 +1,5 @@ [env] COMPILE_ENV = { value = "compile-env", relative = true, force = false } -SYSROOT = { value = "compile-env/sysroot", relative = true, force = false } - PATH = { value = "compile-env/bin", relative = true, force = true } LD_LIBRARY_PATH = { value = "compile-env/lib", relative = true, force = true } LIBCLANG_PATH = { value = "compile-env/lib", relative = true, force = true } diff --git a/.github/workflows/build-and-deploy-docs.yml b/.github/workflows/build-and-deploy-docs.yml index 3325847b..5a9660eb 100644 --- a/.github/workflows/build-and-deploy-docs.yml +++ b/.github/workflows/build-and-deploy-docs.yml @@ -46,10 +46,6 @@ jobs: - 'design-docs/**' - 'nix/**' - '.github/workflows/build-and-deploy-docs.yml' - - uses: cargo-bins/cargo-binstall@main - - run: cargo binstall --no-confirm just - - run: cargo binstall --no-confirm cargo-deny - - run: just cargo deny check build: name: "Build and deploy documentation" diff --git a/Cargo.lock b/Cargo.lock index cfcad348..3e4457fb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,15 +34,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstyle" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8365de52b16c035ff4fcafe0092ba9390540e3e352870ac09933bebcaa2c8c56" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anyhow" -version = "1.0.91" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" +checksum = "74f37166d7d48a0284b99dd824694c26119c700b53bf0d1540cdb147dbdaaf13" [[package]] name = "arrayvec" @@ -88,7 +88,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -208,9 +208,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.1.31" +version = "1.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" +checksum = "67b9470d453346108f93a59222a9a1a5724db32d0a4727b7ab7ace4b4d822dc9" dependencies = [ "shlex", ] @@ -459,9 +459,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "hermit-abi" @@ -671,7 +671,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -739,7 +739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -906,7 +906,7 @@ checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -961,9 +961,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.85" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", @@ -1046,7 +1046,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] [[package]] @@ -1134,7 +1134,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -1156,7 +1156,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1317,5 +1317,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.85", + "syn 2.0.87", ] diff --git a/design-docs/src/mdbook/book.toml b/design-docs/src/mdbook/book.toml index 56359f4f..c55981b7 100644 --- a/design-docs/src/mdbook/book.toml +++ b/design-docs/src/mdbook/book.toml @@ -6,9 +6,7 @@ src = "src" title = "Hedgehog Dataplane Design Notes" [preprocessor.plantuml] -plantuml-cmd = "plantuml" after = ["links"] -use-data-uris = false [preprocessor.mermaid] after = ["links"] diff --git a/dpdk-sysroot-helper/src/lib.rs b/dpdk-sysroot-helper/src/lib.rs index 91515643..236c0475 100644 --- a/dpdk-sysroot-helper/src/lib.rs +++ b/dpdk-sysroot-helper/src/lib.rs @@ -33,7 +33,8 @@ pub fn get_compile_env() -> String { } pub fn get_sysroot() -> String { - let sysroot_env = env::var("SYSROOT").expect("sysroot env not set"); + let compile_env = env::var("COMPILE_ENV").expect("COMPILE_ENV not set"); + let sysroot_env = format!("{compile_env}/sysroot"); let target = get_target_name(); let profile = get_profile_name(); let expected_sysroot = format!("{sysroot_env}/{target}/{profile}"); diff --git a/justfile b/justfile index 14486acf..9735a98d 100644 --- a/justfile +++ b/justfile @@ -38,8 +38,7 @@ profile := "dev" _container_repo := "ghcr.io/githedgehog/dataplane" rust := "stable" _dpdk_sys_container_repo := "ghcr.io/githedgehog/dpdk-sys" -_env_branch := "main" -_dpdk_sys_container_tag := _env_branch + "-rust-" + rust + "-" + dpdk_sys_commit +_dpdk_sys_container_tag := dpdk_sys_commit + "-rust-" + rust _dev_env_container := _dpdk_sys_container_repo + "/dev-env:" + _dpdk_sys_container_tag _doc_env_container := _dpdk_sys_container_repo + "/doc-env:" + _dpdk_sys_container_tag _compile_env_container := _dpdk_sys_container_repo + "/compile-env:" + _dpdk_sys_container_tag @@ -479,7 +478,6 @@ mdbook *args="build": cd ./design-docs/src/mdbook docker run \ --rm \ - -it \ --init \ --volume "$(pwd):$(pwd)" \ --user "$(id -u):$(id -g)" \ diff --git a/scratch/Cargo.toml b/scratch/Cargo.toml index 5119fd47..f8fd9794 100644 --- a/scratch/Cargo.toml +++ b/scratch/Cargo.toml @@ -8,11 +8,10 @@ publish = false dpdk-sys = { path = "../dpdk-sys" } dpdk = { path = "../dpdk" } +rand = { version = "0.8.5" } thiserror = { workspace = true } tracing = { workspace = true, features = ["attributes"] } tracing-subscriber = { workspace = true } -rand = { version = "0.8" } - [build-dependencies] dpdk-sysroot-helper = { path = "../dpdk-sysroot-helper" } diff --git a/scratch/build.rs b/scratch/build.rs index 7a28a907..c18a3acb 100644 --- a/scratch/build.rs +++ b/scratch/build.rs @@ -5,6 +5,6 @@ fn main() { rerun_if_changed.iter().for_each(|file| { println!("cargo:rerun-if-changed={file}"); }); - println!("cargo:rustc-link-search=all={sysroot}/lib"); + println!("cargo:rustc-link-search=native={sysroot}/lib"); println!("cargo:rustc-link-arg=--sysroot={sysroot}"); } diff --git a/scripts/dpdk-sys.env b/scripts/dpdk-sys.env index b38aa5a8..a2b0349f 100644 --- a/scripts/dpdk-sys.env +++ b/scripts/dpdk-sys.env @@ -1,2 +1,2 @@ DPDK_SYS_BRANCH="main" -DPDK_SYS_COMMIT="02d235e5f259dd591401911b3336f72dea4c824a" +DPDK_SYS_COMMIT="e4055e30aa6c44dcf97d7b4c992c6db5a1894241"