Skip to content

Commit

Permalink
cmm: Add all direct third-party dependencies to manifest scope
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Spinale <[email protected]>
  • Loading branch information
nspin committed Oct 29, 2024
1 parent 4666a4f commit 5a3a4fa
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 45 deletions.
6 changes: 3 additions & 3 deletions crates/examples/microkit/banscii/pds/artist/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# SPDX-License-Identifier: BSD-2-Clause
#

{ mk, localCrates }:
{ mk, versions, localCrates }:

mk {
package.name = "banscii-artist";
dependencies = {
rsa = { version = "0.8.1"; default-features = false; features = [ "pem" "sha2" ]; };
rsa = { version = versions.rsa; default-features = false; features = [ "pem" "sha2" ]; };
inherit (localCrates)
sel4-microkit-message
banscii-artist-interface-types
Expand All @@ -18,6 +18,6 @@ mk {
sel4-externally-shared = localCrates.sel4-externally-shared // { features = [ "unstable" ]; };
};
build-dependencies = {
rsa = "0.8.1";
inherit (versions) rsa;
};
}
2 changes: 1 addition & 1 deletion crates/examples/microkit/banscii/pds/assistant/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mk {
package.name = "banscii-assistant";
dependencies = {
inherit (versions) embedded-hal-nb;
hex = { version = "0.4.3"; default-features = false; features = [ "alloc" ]; };
hex = { version = versions.hex; default-features = false; features = [ "alloc" ]; };
inherit (localCrates)
sel4-microkit-message
sel4-microkit-driver-adapters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mk {
package.name = "banscii-assistant-core";
dependencies = {
inherit (versions) log;
ab_glyph = { version = "0.2.22"; default-features = false; features = [ "libm" ]; };
ab_glyph = { version = versions.ab_glyph; default-features = false; features = [ "libm" ]; };
num-traits = { version = versions.num-traits; default-features = false; features = [ "libm" ]; };
};
}
2 changes: 1 addition & 1 deletion crates/examples/microkit/http-server/pds/server/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ mk {
};

build-dependencies = {
rcgen = "0.11.1";
inherit (versions) rcgen;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ mk {
];
};

httparse = { version = "1.8.0"; default-features = false; };
httparse = { version = versions.httparse; default-features = false; };

smoltcp = smoltcpWith [];

rustls = rustlsWith [] // (localCrates.rustls or {});

rustls-pemfile = { version = "2.0.0"; default-features = false; };
rustls-pemfile = { version = versions.rustls-pemfile; default-features = false; };

inherit (localCrates)
sel4-async-single-threaded-executor
Expand Down
5 changes: 2 additions & 3 deletions crates/private/tests/root-task/c/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#

{ mk, localCrates }:
{ mk, versions, localCrates }:

mk {
package.name = "tests-root-task-c";
Expand All @@ -16,7 +16,6 @@ mk {
;
};
build-dependencies = {
cc = "1.0.76";
glob = "0.3.0";
inherit (versions) cc glob;
};
}
4 changes: 2 additions & 2 deletions crates/private/tests/root-task/dafny/core/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: BSD-2-Clause
#

{ mk, localCrates, dafnySource }:
{ mk, versions, localCrates, dafnySource }:

mk {
package.name = "tests-root-task-dafny-core";
Expand All @@ -14,6 +14,6 @@ mk {
# dafny_runtime
;
dafny_runtime = dafnySource;
num = { version = "0.4"; default-features = false; features = ["alloc"]; };
num = { version = versions.num; default-features = false; features = ["alloc"]; };
};
}
2 changes: 1 addition & 1 deletion crates/private/tests/root-task/dafny/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ edition = "2021"
license = "BSD-2-Clause"

[dependencies]
num = { version = "0.4", default-features = false, features = ["alloc"] }
num = { version = "0.4.1", default-features = false, features = ["alloc"] }
sel4-mod-in-out-dir = { path = "../../../../../sel4-mod-in-out-dir" }

[dependencies.dafny_runtime]
Expand Down
6 changes: 3 additions & 3 deletions crates/sel4-async/block-io/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ mk {
version = versions.futures;
default-features = false;
};
bytemuck = { version = "1.4.0"; default-features = false; };
gpt_disk_types = { version = "0.15.0"; features = [ "bytemuck" ]; };
lru = { version = "0.10.0"; optional = true; };
bytemuck = { version = versions.bytemuck; default-features = false; };
gpt_disk_types = { version = versions.gpt_disk_types; features = [ "bytemuck" ]; };
lru = { version = versions.lru; optional = true; };
};
features = {
alloc = [ "futures/alloc" "lru" ];
Expand Down
5 changes: 2 additions & 3 deletions crates/sel4-async/block-io/fat/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
mk {
package.name = "sel4-async-block-io-fat";
dependencies = {
inherit (versions) log heapless;
hex = { version = "0.4.3"; default-features = false; };
lru = "0.10.0";
inherit (versions) log heapless lru;
hex = { version = versions.hex; default-features = false; };
futures = {
version = versions.futures;
default-features = false;
Expand Down
2 changes: 1 addition & 1 deletion crates/sel4-backtrace/addr2line-context-helper/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ mk {
addr2line = { version = versions.addr2line; default-features = false; features = [ "rustc-demangle" "cpp_demangle" "fallible-iterator" "smallvec" ]; };
gimli = { version = versions.gimli; default-features = false; features = [ "endian-reader" ]; };
object = { version = versions.object; default-features = false; features = [ "read" ]; };
stable_deref_trait = { version = "1.1.0"; default-features = false; features = [ "alloc" ]; };
stable_deref_trait = { version = versions.stable_deref_trait; default-features = false; features = [ "alloc" ]; };
};
}
3 changes: 1 addition & 2 deletions crates/sel4-backtrace/cli/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
mk {
package.name = "sel4-backtrace-cli";
dependencies = {
inherit (versions) object clap;
hex = "0.4.3";
inherit (versions) object clap hex;
inherit (localCrates) sel4-backtrace-addr2line-context-helper;
sel4-backtrace-types = localCrates.sel4-backtrace-types // { features = [ "full" ]; };
};
Expand Down
2 changes: 1 addition & 1 deletion crates/sel4-capdl-initializer/embed-spec/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ mk {
syn
serde
serde_json
hex
;
hex = "0.4.3";
sel4-capdl-initializer-types = localCrates.sel4-capdl-initializer-types // { features = [ "serde" "std" "deflate" ]; };
};
}
2 changes: 1 addition & 1 deletion crates/sel4-capdl-initializer/types/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mk {
package.name = "sel4-capdl-initializer-types";
dependencies = {
inherit (versions) cfg-if log;
miniz_oxide = { version = "0.6.2"; default-features = false; optional = true; };
miniz_oxide = { version = versions.miniz_oxide; default-features = false; optional = true; };
serde = serdeWith [ "derive" "alloc" ] // { optional = true; };
serde_json = { version = versions.serde_json; optional = true; };
inherit (localCrates)
Expand Down
12 changes: 5 additions & 7 deletions crates/sel4-kernel-loader/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mk {
inherit (versions) cfg-if log embedded-hal-nb;
postcard = postcardWith [];
heapless = { version = versions.heapless; features = [ "serde" ]; };
spin = { version = "0.9.4"; features = [ "lock_api" ]; };
spin = { version = versions.spin; features = [ "lock_api" ]; };
inherit (localCrates)
sel4-platform-info
sel4-logging
Expand All @@ -25,15 +25,13 @@ mk {
sel4-kernel-loader-payload-types = localCrates.sel4-kernel-loader-payload-types // { features = [ "serde" ]; };
};
target."cfg(any(target_arch = \"riscv32\", target_arch = \"riscv64\"))".dependencies = {
sbi = "0.2.0";
riscv = "0.10.0";
inherit (versions) sbi riscv;
};
target."cfg(any(target_arch = \"arm\", target_arch = \"aarch64\"))".dependencies = {
inherit (localCrates) sel4-pl011-driver sel4-bcm2835-aux-uart-driver;
};
target."cfg(target_arch = \"aarch64\")".dependencies = {
smccc = "0.1.1";
aarch64-cpu = "9.4.0";
inherit (versions) smccc aarch64-cpu;
};
build-dependencies = {
inherit (versions)
Expand All @@ -42,10 +40,10 @@ mk {
object
serde
prettyplease
cc
glob
;
postcard = postcardWith [ "alloc" ];
cc = "1.0.76";
glob = "0.3.0";
syn = { version = versions.syn; features = [ "parsing" ]; };
inherit (localCrates)
sel4-platform-info
Expand Down
3 changes: 1 addition & 2 deletions crates/sel4-kernel-loader/embed-page-tables/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
mk {
package.name = "sel4-kernel-loader-embed-page-tables";
dependencies = {
inherit (versions) proc-macro2 quote;
bitfield = "0.14";
inherit (versions) proc-macro2 quote bitfield;
};
}
2 changes: 1 addition & 1 deletion crates/sel4-newlib/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ mk {
log = { version = versions.log; optional = true; };
};
build-dependencies = {
cc = { version = "1.0.82"; optional = true; };
cc = { version = versions.cc; optional = true; };
};
}
2 changes: 1 addition & 1 deletion crates/sel4-newlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ log = { version = "0.4.17", optional = true }
sel4-panicking-env = { path = "../sel4-panicking/env" }

[build-dependencies]
cc = { version = "1.0.82", optional = true }
cc = { version = "1.0.76", optional = true }
5 changes: 2 additions & 3 deletions crates/sel4/bitfield-parser/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
# SPDX-License-Identifier: BSD-2-Clause
#

{ mk }:
{ mk, versions }:

mk {
package.name = "sel4-bitfield-parser";
dependencies = rec {
regex = "1.7.0";
pest = "2.4.1";
inherit (versions) regex pest;
pest_derive = pest;
};
}
3 changes: 1 addition & 2 deletions crates/sel4/config/data/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
mk {
package.name = "sel4-config-data";
dependencies = {
inherit (versions) serde_json;
lazy_static = "1.4.0";
inherit (versions) serde_json lazy_static;
sel4-config-generic-types = localCrates.sel4-config-generic-types // { features = [ "serde" ]; };
};
build-dependencies = {
Expand Down
8 changes: 4 additions & 4 deletions crates/sel4/sys/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ mk {
;
};
build-dependencies = {
inherit (versions) proc-macro2 quote prettyplease;
bindgen = "0.68.1";
xmltree = "0.10.3";
glob = "0.3.0";
inherit (versions)
proc-macro2 quote prettyplease
bindgen xmltree glob
;
syn = { version = versions.syn; features = [ "parsing" ]; };
inherit (localCrates)
sel4-build-env
Expand Down
24 changes: 24 additions & 0 deletions hacking/cargo-manifest-management/manifest-scope.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ in rec {
};

versions = {
aarch64-cpu = "9.4.0";
ab_glyph = "0.2.22";
addr2line = "0.24.2";
anyhow = "1.0.66";
async-unsync = "0.2.2";
bindgen = "0.68.1";
bitfield = "0.14";
bytemuck = "1.4.0";
cc = "1.0.76";
cfg-if = "1.0.0";
chrono = "0.4.35";
clap = "4.4.6";
Expand All @@ -102,32 +108,50 @@ in rec {
futures = "0.3.28";
getrandom = "0.2.10";
gimli = "0.31.1";
glob = "0.3.0";
gpt_disk_types = "0.15.0";
heapless = "0.7.16";
hex = "0.4.3";
httparse = "1.8.0";
lazy_static = "1.4.0"; # TODO remove
lock_api = "0.4.12";
log = "0.4.17";
lru = "0.10.0";
miniz_oxide = "0.6.2";
num = "0.4.1";
num_enum = "0.5.9";
num-traits = "0.2.16";
object = "0.36.5";
pest = "2.4.1";
pin-project = "1.1.3";
postcard = "1.0.2";
prettyplease = "0.2.25";
proc-macro2 = "1.0.89";
quote = "1.0.37";
rand = "0.8.5";
rcgen = "0.11.1";
regex = "1.7.0";
riscv = "0.10.0";
rsa = "0.8.1";
rtcc = "0.3.2";
rustc_version = "0.4.0";
rustls = "0.23.5";
rustls-pemfile = "2.0.0";
sbi = "0.2.0";
serde = "1.0.147";
serde_json = "1.0.87";
serde_yaml = "0.9.14";
smccc = "0.1.1";
smoltcp = "0.10.0";
spin = "0.9.4";
stable_deref_trait = "1.1.0"; # for gimli dep of sel4-backtrace-addr2line-context-helper
syn = "2.0.85";
thiserror = "1.0";
tock-registers = "0.8.1";
unwinding = "0.2.3";
virtio-drivers = "0.7.2";
webpki-roots = "0.26";
xmltree = "0.10.3";
zerocopy = "0.7.32";
};

Expand Down

0 comments on commit 5a3a4fa

Please sign in to comment.