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

Bump Rust toolchain #220

Merged
merged 8 commits into from
Oct 28, 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
16 changes: 5 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions crates/drivers/virtio/net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ impl<H: Hal, T: Transport> GetNetDeviceMeta for DeviceWrapper<H, T> {
}

impl<H: Hal, T: Transport> Device for DeviceWrapper<H, T> {
type RxToken<'a> = VirtioRxToken<H, T> where Self: 'a;
type TxToken<'a> = VirtioTxToken<H, T> where Self: 'a;
type RxToken<'a>
= VirtioRxToken<H, T>
where
Self: 'a;
type TxToken<'a>
= VirtioTxToken<H, T>
where
Self: 'a;

fn receive(&mut self, _timestamp: Instant) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)> {
match self.inner.borrow_mut().receive() {
Expand Down
4 changes: 3 additions & 1 deletion crates/private/tests/root-task/verus/task/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ mk {
dependencies = {
inherit (localCrates)
sel4
sel4-root-task
tests-root-task-verus-core
;
sel4-root-task = localCrates.sel4-root-task // {
default-features = false;
};
};
}
2 changes: 1 addition & 1 deletion crates/private/tests/root-task/verus/task/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ license = "BSD-2-Clause"

[dependencies]
sel4 = { path = "../../../../../sel4" }
sel4-root-task = { path = "../../../../../sel4-root-task" }
sel4-root-task = { path = "../../../../../sel4-root-task", default-features = false }
tests-root-task-verus-core = { path = "../core" }
2 changes: 1 addition & 1 deletion crates/sel4-backtrace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sel4-backtrace-types = { path = "types" }
serde = { version = "1.0.147", default-features = false, optional = true }

[dependencies.unwinding]
version = "0.2.1"
version = "0.2.3"
default-features = false
features = ["unwinder", "fde-custom", "hide-trace"]
optional = true
2 changes: 1 addition & 1 deletion crates/sel4-capdl-initializer/types/src/cap_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub trait HasCapTable {
#[allow(clippy::type_complexity)]
fn slots_as<'a, T: TryFrom<&'a Cap>>(
&'a self,
) -> iter::Map<slice::Iter<'_, (usize, Cap)>, fn(&'a (usize, Cap)) -> (usize, T)>
) -> iter::Map<slice::Iter<'a, (usize, Cap)>, fn(&'a (usize, Cap)) -> (usize, T)>
where
<T as TryFrom<&'a Cap>>::Error: fmt::Debug,
{
Expand Down
2 changes: 1 addition & 1 deletion crates/sel4-panicking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sel4-panicking-env = { path = "env" }
rustc_version = "0.4.0"

[target."cfg(not(target_arch = \"arm\"))".dependencies.unwinding]
version = "0.2.1"
version = "0.2.3"
default-features = false
features = ["unwinder", "fde-custom", "hide-trace", "personality"]
optional = true
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pub(crate) fn start_panic(payload: Payload) -> i32 {

assert!(CURRENT_PAYLOAD.replace(Some(payload)).is_none());

#[allow(static_mut_refs)]
unsafe {
assert!(!CURRENT_EXCEPTION.exception_present);
CURRENT_EXCEPTION = CurrentException {
Expand Down
2 changes: 1 addition & 1 deletion crates/sel4-runtime-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sel4-panicking-env = { path = "../sel4-panicking/env" }
sel4-stack = { path = "../sel4-stack" }

[target."cfg(not(target_arch = \"arm\"))".dependencies.unwinding]
version = "0.2.1"
version = "0.2.3"
default-features = false
features = ["unwinder", "fde-custom", "hide-trace"]
optional = true
14 changes: 12 additions & 2 deletions crates/sel4-shared-ring-buffer/smoltcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,18 @@ impl<A: AbstractBounceBufferAllocator, R: RawMutex, P: AbstractRcT> DeviceImpl<A
}

impl<A: AbstractBounceBufferAllocator, R: RawMutex, P: AbstractRcT> Device for DeviceImpl<A, R, P> {
type RxToken<'a> = RxToken<A, R, P> where A: 'a, R: 'a, P: 'a;
type TxToken<'a> = TxToken<A, R, P> where A: 'a, R: 'a, P: 'a;
type RxToken<'a>
= RxToken<A, R, P>
where
A: 'a,
R: 'a,
P: 'a;
type TxToken<'a>
= TxToken<A, R, P>
where
A: 'a,
R: 'a,
P: 'a;

fn capabilities(&self) -> DeviceCapabilities {
self.inner().lock().caps().clone()
Expand Down
1 change: 1 addition & 0 deletions crates/sel4/Cargo.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ mk rec {
});
package.name = "sel4";
package.license = "MIT";
package.rust-version = "1.76"; # tracks verus
dependencies = {
inherit (versions) cfg-if;
inherit (localCrates)
Expand Down
1 change: 1 addition & 0 deletions crates/sel4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ version = "0.1.0"
authors = ["Nick Spinale <nick.spinale@coliasgroup.com>"]
edition = "2021"
license = "MIT"
rust-version = "1.76"

[features]
default = ["state"]
Expand Down
2 changes: 1 addition & 1 deletion hacking/cargo-manifest-management/manifest-scope.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ in rec {
syn = "2.0.85";
thiserror = "1.0";
tock-registers = "0.8.1";
unwinding = "0.2.1";
unwinding = "0.2.3";
virtio-drivers = "0.7.2";
webpki-roots = "0.26";
zerocopy = "0.7.32";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl Policy {
fn matching_rules_in_order_of_precedence<'a>(
&'a self,
path: &'a [PathSegment],
) -> impl 'a + Iterator<Item = &TableRule> {
) -> impl 'a + Iterator<Item = &'a TableRule> {
self.table_rules
.iter()
.rev()
Expand Down
2 changes: 1 addition & 1 deletion hacking/nix/scope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ superCallPackage ../rust-utils {} self //

defaultRustToolchain = fenix.fromToolchainFile {
file = topLevelRustToolchainFile;
sha256 = "sha256-GJR7CjFPMh450uP/EUzXeng15vusV3ktq7Cioop945U=";
sha256 = "sha256-L1F7kAfo8YWrKXHflUaVvCELdvnK2XjcL/lwopFQX2c=";
};

upstreamDefaultRustEnvironment = elaborateRustEnvironment (mkDefaultElaborateRustEnvironmentArgs {
Expand Down
6 changes: 5 additions & 1 deletion hacking/nix/scope/world/instances/verus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ mkInstance {
rootCrate = crates.tests-root-task-verus-task;
release = false;

verifyWithVerus = true;
extraProfile = {
panic = "abort";
};

layers = [
crateUtils.defaultIntermediateLayer
Expand All @@ -34,6 +36,8 @@ mkInstance {
modifications = seL4Modifications;
}
];

verifyWithVerus = true;
};

extraPlatformArgs = lib.optionalAttrs canSimulate {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
#

[toolchain]
channel = "nightly-2024-09-01"
channel = "nightly-2024-10-26"
components = [ "rustfmt", "rust-src", "rustc-dev", "llvm-tools-preview" ]
Loading