Skip to content
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
1 change: 0 additions & 1 deletion .github/scripts/ci-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cargo_toml=$project_root/Cargo.toml
dummyvm_toml=$project_root/docs/dummyvm/Cargo.toml

# Pin certain deps for our MSRV
cargo update -p [email protected] --precise 0.5.5 # This can be removed once we move to Rust 1.81 or newer
cargo update -p [email protected] --precise 0.5.5 # This requires Rust edition 2024

# Repeat a command for all the features. Requires the command as one argument (with double quotes)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/micro-bm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
with:
repository: mmtk/ci-perf-kit
token: ${{ secrets.GITHUB_TOKEN }}
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perf-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
repository: mmtk/ci-perf-kit
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# setup
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
repository: mmtk/ci-perf-kit
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# setup
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perf-compare-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
with:
repository: mmtk/ci-perf-kit
token: ${{ secrets.CI_ACCESS_TOKEN }}
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# setup
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
with:
repository: mmtk/ci-perf-kit
token: ${{ secrets.CI_ACCESS_TOKEN }}
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# setup
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/perf-regression-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: mmtk/ci-perf-kit
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
token: ${{ secrets.CI_ACCESS_TOKEN }}
submodules: true
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: mmtk/ci-perf-kit
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
submodules: true
# download canary build
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: mmtk/ci-perf-kit
ref: "0.8.4"
ref: "0.8.5"
path: ci-perf-kit
token: ${{ secrets.CI_ACCESS_TOKEN }}
submodules: true
Expand Down
24 changes: 4 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repository = "https://github.com/mmtk/mmtk-core"
readme = "README.md"
categories = ["memory-management"]
keywords = ["gc", "garbage", "collection", "garbage-collection", "allocation"]
rust-version = "1.74.1"
rust-version = "1.84"
build = "build.rs"

[lib]
Expand Down Expand Up @@ -59,24 +59,9 @@ paste = "1.0.8"
rand = "0.9.0"
rand_chacha = "0.9.0"
criterion = "0.5"
# Note: `half` v2.5.0 started to require Rust 1.81.
# `criterion` transitively depends on `half` via the dependency chain:
# criterion -> ciborium -> ciborium_ll -> half
# The MSRV of `ciborium` v0.2.2 is declared as 1.58, and is declared to depend on `half` v2.2.
# Ciborium should either bump its MSRV or select a version of `half` that satisfies its current MSRV.
# We lock the version of `half` to 2.4.1 to workaround this.
# TODO: When we bump MSRV to 1.84 or above, we can rely on Cargo's MSRV-aware dependency resolver and remove such workarounds.
half = "=2.4.1"

[build-dependencies]
built = { version = "0.7.7", features = ["git2"] }
# Note: Some components in ICU4X started to require Rust 1.81 since some versions, such as `litemap` v0.7.5.
# The `built` crate depends on ICU4X via the dependency chain:
# built -> git2 -> url -> idna -> idna_adapter --(default)--------> crates from the ICU4X projects
# --(alternatively)--> `unicode-rs`
# But we don't need ICU4X (or even `url`) because we only use `git2` to get the Git commit hash.
# We move away from ICU4X completely following the instruction in https://docs.rs/crate/idna_adapter/1.2.0
idna_adapter = "=1.1.0"

[lints.clippy]
# Allow this. Clippy suggests we should use Sft, Mmtk, rather than SFT and MMTK.
Expand All @@ -88,10 +73,9 @@ idna_adapter = "=1.1.0"
# to me - considering it will break our API and all the efforts for all the developers to make the change, it may
# not worth it.
upper_case_acronyms = "allow"
# Temporarily allow this -- 9 July 2025. Clippy suggests that we should always inline format args if possible.
# We see pushbacks on this lint in Rust 1.67, and the lint was downgraded to pedantic in 1.67.1. It was upgraded
# again in Rust 1.88. We temporarily disable this lint and see the reaction from the community.
# If there is no pushback for this lint in a few momnths' time, we should remove the following line and migrate the codebase.
# Allow this -- 9 July 2025. Clippy suggests that we should always inline format args if possible.
# This lint was upgraded to 'style' in Rust 1.67, and then was downgraded to pedantic in 1.67.1.
# It was upgraded again in Rust 1.88, and downgraded again in Rust 1.89. We disable this lint to avoid warnings in affected versions.
# See https://github.com/mmtk/mmtk-core/issues/1334.
uninlined_format_args = "allow"

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.83.0
1.92.0
4 changes: 3 additions & 1 deletion src/policy/sft_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ impl SFTRefStorage {
let val = self.0.load(Ordering::Acquire);
// Provenance-related APIs were stabilized in Rust 1.84.
// Rust 1.91 introduced the warn-by-default lint `integer_to_ptr_transmutes`.
// Since our MSRV is still 1.74.1, we can't fix it until bumping MSRV.
// However, pointer provenance API only works for ptr-sized intergers, and
// here we are transmuting from a double-word sized integer to a fat pointer.
// We still need to use transmute here.
#[allow(unknown_lints)]
#[allow(integer_to_ptr_transmutes)]
unsafe {
Expand Down
6 changes: 1 addition & 5 deletions src/util/alloc/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,9 @@ pub fn align_allocation_inner<VM: VMBinding>(
}

// May require an alignment
let region_isize = region.as_usize() as isize;
let mask = (alignment - 1) as isize; // fromIntSignExtend
let neg_off: isize = -(offset as isize); // fromIntSignExtend

// TODO: Consider using neg_off.wrapping_sub_unsigned(region.as_usize()), and we can remove region_isize.
// This requires Rust 1.66.0+.
let delta = neg_off.wrapping_sub(region_isize) & mask; // Use wrapping_sub to avoid overflow
let delta = neg_off.wrapping_sub_unsigned(region.as_usize()) & mask; // Use wrapping_sub to avoid overflow

if fillalignmentgap && (VM::ALIGNMENT_VALUE != 0) {
fill_alignment_gap::<VM>(region, region + delta);
Expand Down
10 changes: 3 additions & 7 deletions src/util/erase_vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,13 @@ macro_rules! define_erased_vm_mut_ref {
pub struct $new_type<'a>(usize, PhantomData<&'a ()>);
impl<'a> $new_type<'a> {
pub fn new<VM: VMBinding>(r: &'a mut $orig_type) -> Self {
let worker_as_usize: usize = unsafe { std::mem::transmute(r) };
let worker_as_usize: usize = (r as *mut $orig_type).expose_provenance();
Self(worker_as_usize, PhantomData)
}
pub fn into_mut<VM: VMBinding>(self) -> &'a mut $orig_type {
// Provenance-related APIs were stabilized in Rust 1.84.
// Rust 1.91 introduced the warn-by-default lint `integer_to_ptr_transmutes`.
// Since our MSRV is still 1.74.1, we can't fix it until bumping MSRV.
#[allow(unknown_lints)]
#[allow(integer_to_ptr_transmutes)]
unsafe {
std::mem::transmute(self.0)
&mut *(std::ptr::with_exposed_provenance(self.0) as *const $orig_type
as *mut $orig_type)
}
}
}
Expand Down