Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage direct third-party dependencies #223

Merged
merged 21 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
544 changes: 168 additions & 376 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/drivers/bcm2835-aux-uart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ license = "BSD-2-Clause"
[dependencies]
embedded-hal-nb = "1.0"
sel4-driver-interfaces = { path = "../../sel4-driver-interfaces" }
tock-registers = "0.8.1"
tock-registers = "0.9.0"
2 changes: 1 addition & 1 deletion crates/drivers/pl011/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ license = "BSD-2-Clause"
[dependencies]
embedded-hal-nb = "1.0"
sel4-driver-interfaces = { path = "../../sel4-driver-interfaces" }
tock-registers = "0.8.1"
tock-registers = "0.9.0"
2 changes: 1 addition & 1 deletion crates/drivers/pl031/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ license = "BSD-2-Clause"

[dependencies]
rtcc = "0.3.2"
tock-registers = "0.8.1"
tock-registers = "0.9.0"
2 changes: 1 addition & 1 deletion crates/drivers/sp804/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ license = "BSD-2-Clause"

[dependencies]
sel4-driver-interfaces = { path = "../../sel4-driver-interfaces" }
tock-registers = "0.8.1"
tock-registers = "0.9.0"
2 changes: 1 addition & 1 deletion crates/drivers/virtio/net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ sel4-driver-interfaces = { path = "../../../sel4-driver-interfaces" }
virtio-drivers = { version = "0.7.2", default-features = false, features = ["alloc"] }

[dependencies.smoltcp]
version = "0.10.0"
version = "0.11.0"
default-features = false
features = ["proto-ipv4", "proto-dhcpv4", "proto-dns", "socket-dhcpv4", "socket-dns", "socket-tcp"]
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;
};
}
4 changes: 2 additions & 2 deletions crates/examples/microkit/banscii/pds/artist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ license = "BSD-2-Clause"

[dependencies]
banscii-artist-interface-types = { path = "interface-types" }
rsa = { version = "0.8.1", default-features = false, features = ["pem", "sha2"] }
rsa = { version = "0.9.6", default-features = false, features = ["pem", "sha2"] }
sel4-externally-shared = { path = "../../../../../sel4-externally-shared", features = ["unstable"] }
sel4-microkit-message = { path = "../../../../../sel4-microkit/message" }

Expand All @@ -28,4 +28,4 @@ default-features = false
features = ["alloc"]

[build-dependencies]
rsa = "0.8.1"
rsa = "0.9.6"
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ fn get_priv_key() -> RsaPrivateKey {
}

pub(crate) fn sign(data: &[u8]) -> Signature {
let signing_key = SigningKey::<Sha256>::new_with_prefix(get_priv_key());
let signing_key = SigningKey::<Sha256>::new(get_priv_key());
signing_key.sign(data)
}
7 changes: 4 additions & 3 deletions crates/examples/microkit/banscii/pds/artist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ extern crate alloc;

use alloc::vec;

use rsa::signature::SignatureEncoding;

use sel4_externally_shared::{
access::{ReadOnly, ReadWrite},
ExternallySharedRef, ExternallySharedRefExt,
Expand Down Expand Up @@ -87,8 +89,7 @@ impl Handler for HandlerImpl {
.index(masterpiece_start..masterpiece_end)
.copy_from_slice(&masterpiece.pixel_data);

let signature = cryptographic_secrets::sign(&masterpiece.pixel_data);
let signature = signature.as_ref();
let signature = cryptographic_secrets::sign(&masterpiece.pixel_data).to_bytes();

let signature_start = masterpiece_end;
let signature_size = signature.len();
Expand All @@ -97,7 +98,7 @@ impl Handler for HandlerImpl {
self.region_out
.as_mut_ptr()
.index(signature_start..signature_end)
.copy_from_slice(signature);
.copy_from_slice(&signature);

MessageInfo::send_using_postcard(Response {
height: masterpiece.height,
Expand Down
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" ]; };
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
mk {
package.name = "banscii-assistant-core-test";
dependencies = {
inherit (versions) log;
env_logger = "0.10.0";
inherit (versions) log env_logger;
inherit (localCrates) banscii-assistant-core;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ license = "BSD-2-Clause"

[dependencies]
banscii-assistant-core = { path = ".." }
env_logger = "0.10.0"
env_logger = "0.11.5"
log = "0.4.17"
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;
};
}
6 changes: 3 additions & 3 deletions crates/examples/microkit/http-server/pds/server/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]
async-unsync = { version = "0.2.2", default-features = false }
async-unsync = { version = "0.3.0", default-features = false }
futures = { version = "0.3.28", default-features = false, features = ["async-await", "alloc"] }
lock_api = "0.4.12"
log = "0.4.17"
Expand Down Expand Up @@ -56,7 +56,7 @@ path = "../../../../../sel4-shared-ring-buffer/block-io/types"
path = "../../../../../sel4-shared-ring-buffer/bookkeeping"

[dependencies.smoltcp]
version = "0.10.0"
version = "0.11.0"
default-features = false
features = [
"proto-ipv4",
Expand All @@ -69,4 +69,4 @@ features = [
]

[build-dependencies]
rcgen = "0.11.1"
rcgen = "0.13.1"
4 changes: 2 additions & 2 deletions crates/examples/microkit/http-server/pds/server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
let cert = generate_simple_self_signed(subject_alt_names).unwrap();
let out_dir = env::var("OUT_DIR").unwrap();
let cert_path = PathBuf::from(&out_dir).join("cert.pem");
fs::write(cert_path, cert.serialize_pem().unwrap()).unwrap();
fs::write(cert_path, cert.cert.pem()).unwrap();
let priv_path = PathBuf::from(&out_dir).join("priv.pem");
fs::write(priv_path, cert.serialize_private_key_pem()).unwrap();
fs::write(priv_path, cert.key_pair.serialize_pem()).unwrap();
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ webpki-roots = "0.26"
path = "../../../../../../sel4-async/single-threaded-executor"

[dependencies.smoltcp]
version = "0.10.0"
version = "0.11.0"
default-features = false
features = ["proto-ipv4", "proto-dhcpv4", "proto-dns", "socket-dhcpv4", "socket-dns", "socket-tcp"]
2 changes: 1 addition & 1 deletion crates/examples/root-task/serial-device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ license = "BSD-2-Clause"
[dependencies]
sel4 = { path = "../../../sel4" }
sel4-root-task = { path = "../../../sel4-root-task" }
tock-registers = "0.8.1"
tock-registers = "0.9.0"
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ serde = ["dep:serde"]

[dependencies]
serde = { version = "1.0.147", default-features = false, features = ["derive"], optional = true }
zerocopy = { version = "0.7.32", features = ["derive"] }
zerocopy = { version = "0.8.7", features = ["derive"] }
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern crate alloc;
use core::ops::Range;
use core::str;

use zerocopy::{AsBytes, FromBytes, FromZeroes, Ref};
use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};

mod zerocopy_helpers;

Expand All @@ -31,7 +31,7 @@ pub type Address = NativeWord;
pub type CPtrBits = NativeWord;

#[repr(C)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable, KnownLayout)]
struct Head {
static_heap: ZerocopyOptionWordRange,
static_heap_mutex_notification: ZerocopyOptionWord,
Expand All @@ -42,7 +42,7 @@ struct Head {
}

#[repr(C)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable)]
struct Thread {
ipc_buffer_addr: ZerocopyWord,
endpoint: ZerocopyOptionWord,
Expand Down Expand Up @@ -75,9 +75,8 @@ impl<'a> RuntimeConfig<'a> {
}

pub fn threads(&self) -> &[RuntimeThreadConfig] {
Ref::new_slice(self.index(self.head().threads.try_into_native().unwrap()))
FromBytes::ref_from_bytes(self.index(self.head().threads.try_into_native().unwrap()))
.unwrap()
.into_slice()
}

pub fn image_identifier(&self) -> Option<&str> {
Expand All @@ -93,8 +92,8 @@ impl<'a> RuntimeConfig<'a> {
}

fn head(&self) -> &Head {
let (head, _) = Ref::<_, Head>::new_from_prefix(self.bytes).unwrap();
head.into_ref()
let (head, _) = FromBytes::ref_from_prefix(self.bytes).unwrap();
head
}

fn index(&self, range: Range<usize>) -> &[u8] {
Expand All @@ -103,7 +102,7 @@ impl<'a> RuntimeConfig<'a> {
}

#[repr(transparent)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable)]
pub struct RuntimeThreadConfig {
inner: Thread,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use alloc::string::String;
use alloc::vec;
use alloc::vec::Vec;

use zerocopy::AsBytes;
use zerocopy::IntoBytes;

#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use core::fmt;
use core::ops::Range;

use zerocopy::{AsBytes, BigEndian, FromBytes, FromZeroes, U64};
use zerocopy::{BigEndian, FromBytes, Immutable, IntoBytes, KnownLayout, U64};

pub type ZerocopyWord = U64<BigEndian>;

Expand Down Expand Up @@ -47,7 +47,7 @@ impl<T: fmt::Display> fmt::Display for InvalidZerocopyOptionTagOr<T> {
//

#[repr(C)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable, KnownLayout)]
pub struct ZerocopyWordRange {
start: ZerocopyWord,
end: ZerocopyWord,
Expand Down Expand Up @@ -93,7 +93,7 @@ impl<T: TryInto<NativeWord> + Copy> TryFrom<&Range<T>> for ZerocopyWordRange {
//

#[repr(C)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable, KnownLayout)]
pub struct ZerocopyOptionWord {
is_present: u8,
value: ZerocopyWord,
Expand Down Expand Up @@ -156,7 +156,7 @@ impl TryFrom<&ZerocopyOptionWord> for Option<ZerocopyWord> {
//

#[repr(C)]
#[derive(Debug, Clone, PartialEq, Eq, AsBytes, FromBytes, FromZeroes)]
#[derive(Debug, Clone, PartialEq, Eq, FromBytes, IntoBytes, Immutable, KnownLayout)]
pub struct ZerocopyOptionWordRange {
is_present: u8,
value: ZerocopyWordRange,
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
6 changes: 3 additions & 3 deletions crates/sel4-async/block-io/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ default = ["alloc"]
[dependencies]
bytemuck = { version = "1.4.0", default-features = false }
futures = { version = "0.3.28", default-features = false }
gpt_disk_types = { version = "0.15.0", features = ["bytemuck"] }
gpt_disk_types = { version = "0.16.0", features = ["bytemuck"] }
log = "0.4.17"
lru = { version = "0.10.0", optional = true }
num_enum = { version = "0.5.9", default-features = false }
lru = { version = "0.12.5", optional = true }
num_enum = { version = "0.7.3", default-features = false }
Loading
Loading