GPU teams face a bad trade-off: a control plane per team, or weak isolation in a shared cluster. This reproducible lab combines Kamaji (control planes as pods) and HAMi (fractional GPUs) on a single GPU-less machine using HAMi's mock device plugin.
Part of the DevOps & Operations section — practical guides for running systems in production.
Framing: Rust Release Notes.
Rust 1.100.0 was released on November 12, 2026. It is a milestone release: some of the features it ships — like the never type and custom allocators — were in the works for up to ten years. This guide explains each change in plain language first, then shows the code. No low-level Rust knowledge required.
! (the never type) is finally stable — after 10 years. Conventions that used Infallible now use !.jemalloc or your own allocator with Vec and Box.target/ changed internally — if your tools parse target/ paths, switch them to Cargo's JSON messages.| Feature | What it does | How you try it |
|---|---|---|
Stable Allocator | Custom allocators without nightly | Vec::new_in(MyAllocator) |
Never type ! | Infallible is now ! | fn f() -> Result<T, !> |
| Cargo lints | unused_dependencies as a lint | [lints.cargo] unused_dependencies = "warn" |
| Min publish age | Cooldown for new deps | [registry] global-min-publish-age = "24 hours" |
What is an allocator? When a program runs, it requests blocks of memory (for a Vec, a Box, a string). The piece of code that hands out and reclaims that memory is the allocator. Rust normally uses the operating system's default one, which is safe but not always the fastest or the best fit for your workload.
Why it matters: Alternatives like jemalloc or mimalloc are measurably faster for many server workloads (lower latency, less fragmentation). Until now, using them per-type required the nightly compiler. With Rust 1.100, the core Allocator trait is stable.
Plain-first example — a custom allocator that just delegates to the global one:
// A minimal custom allocator (delegates to the system allocator)
use std::alloc::{Allocator, Global, Layout};
use std::ptr::NonNull;
struct MyAllocator;
unsafe impl Allocator for MyAllocator {
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, std::alloc::AllocError> {
Global.allocate(layout)
}
fn deallocate(&self, ptr: NonNull<u8>, layout: Layout) {
Global.deallocate(ptr, layout)
}
}
// Now use it per-type — this is the new part
let v = Vec::new_in(MyAllocator);
let b: Box<i32, MyAllocator> = Box::new_in(42, MyAllocator);
With jemalloc (the common production choice):
// Cargo.toml: jemallocator = "0.5"
// Option A: swap the allocator for your whole program
#[global_allocator]
static G: jemallocator::Jemalloc = jemallocator::Jemalloc;
// Option B: one specific collection uses jemalloc, the rest stays default
use jemallocator::Jemalloc;
let vec: Vec<u8, Jemalloc> = Vec::new_in(Jemalloc);
It's a big API — more collections and pointer types will gain allocator support in future releases. The core trait is stable now; expect the surface to grow.
! StabilizedWhat is the never type? Some functions never return normally: they panic!, loop forever, call std::process::exit, or unwind via ?. The never type ! is the type of such computations — it can never hold a value. That makes it special: a value of type ! can be used anywhere, because you can never actually produce one.
Why it matters: It took ten years and five failed attempts to stabilize. The win for you: cleaner error handling. Because ! can convert to any type, code that "can't fail" the old way now fits the normal Result machinery.
The classic pattern — a function that is infallible (cannot fail), spelled with !:
// This function can only return an error if parse() fails — and
// unwrap_unchecked() asserts that it never does. The error type "!"
// is uninhabited: there is no value of type "!" to return.
fn parse_infallible(s: &str) -> Result<i32, !> {
s.parse().ok().unwrap_unchecked()
}
Match exhaustiveness — the compiler now understands that one branch can never run:
match result {
Ok(v) => v,
Err(e) => match e {}, // unreachable: you can never construct an `e: !`
}
New stable utilities in the same release:
use std::mem::{DropGuard, conjure_zst};
// Run cleanup code no matter how the function exits.
// DropGuard::new(VALUE, CLOSURE) — the value first, the closure second.
let mut conn = DropGuard::new(
String::from("db-conn"),
|c| println!("closing {c}"), // runs when the guard is dropped
);
// Create a value of a zero-sized type (advanced; must be inhabited)
let _zst: MyZst = unsafe { conjure_zst() };
⚠️ Breaking change: the unstable box pattern is removed.
// ❌ removed
let box x = some_box; // syntax error
// ✅ do this instead
let x = *some_box;
Note:
Infallibleis now an alias for!, so old code keeps compiling — but new code can just write!.
What: For the first time, Cargo has its own lint system (separate from rustc's). Some Cargo warnings are now proper lints you can configure — including a built-in check for unused dependencies.
Why it matters: rustc's unused_crate_dependencies lint has false positives with Cargo (a dependency may be used by one binary in your workspace but not another). The new cargo::unused_dependencies lint is designed to fit Cargo's multi-target reality.
Use it as a warning (informs you, doesn't break the build):
# Cargo.toml
[lints.cargo]
unused_dependencies = "warn"
Or fail CI on it once your tree is clean:
[lints.cargo]
unused_dependencies = "deny"
# Check it in CI
cargo build 2>&1 | grep -q "cargo::unused_dependencies" && exit 1
What: Malicious or broken crate versions are often caught within the first hours or days after publishing. This feature lets Cargo ignore versions published too recently, giving scanners and the community time to catch problems before you deploy them into production.
Why it matters: Transitive dependencies update silently. A brand-new bad release can break your CI with no code change on your side. A cooldown window is cheap insurance.
Configuration (the real Cargo 1.100 keys — [resolver] publish-age does not exist):
# .cargo/config.toml — apply to all registries
[registry]
global-min-publish-age = "24 hours" # ignore crates published < 24h ago
# More conservative for CI / production
[registry]
global-min-publish-age = "7 days"
# Per-registry override (e.g. crates.io only)
[registries.crates-io]
min-publish-age = "24 hours"
How to force a critical update through (it's already in your lockfile, or you opt in per command):
CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allow cargo update -p some-crate
Notes:
CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE env var is preserved in the lockfile.What: The internals of target/ were reorganized (the build-configuration hash now lives in the directory structure, not the file names). No build was broken, but any tool that parses target/ paths may silently find the wrong file.
Why it matters: The layout was ambiguous in edge cases (shared build dirs, --features combinations), which caused extra rebuilds or wrong artifacts. The fix is structural — and sets up future cache improvements.
Do not parse target/ — use Cargo's JSON messages instead:
# All artifacts produced by the build, as JSON
cargo build --message-format=json 2>&1 | jq 'select(.message?.files?[] ) | .message.files[]'
# Package + target metadata without building
cargo metadata --format-version=1 | jq '.packages[] | {name: .name, targets: [.targets[].name]}'
Rule of thumb:
cargo metadataand--message-format=jsonare the supported, stable interfaces.target/is an implementation detail.
Vec::from_fn — fill a vector from a function// Before: set length, then loop
let mut v = Vec::with_capacity(5);
for i in 0..5 {
v.push(i * i);
}
// After (1.100): one call, no resize
let v: Vec<_> = Vec::from_fn(5, |i| i * i);
// v == [0, 1, 4, 9, 16]
Box::{take,map} — move values out of, or transform values inside, a heap allocation// take: move the value out WITHOUT deallocating the memory
let b = Box::new(42);
let (value, uninit) = Box::take(b);
// value = 42, uninit = reusable allocation (see Box::write)
drop(uninit); // deallocate now, or keep and reuse later
// map: transform the boxed value in place, keeping the allocation
let b: Box<i32> = Box::new(42);
let b_str: Box<String> = b.map(|n| n.to_string());
str::{trim_prefix, trim_suffix} — remove a known prefix/suffixlet s = "---hello===";
assert_eq!(s.trim_prefix("---"), "hello===");
assert_eq!(s.trim_suffix("==="), "---hello");
let bytes = b"HTTP/1.1\r\nGET /\r\n";
let body = bytes.trim_prefix(b"HTTP/1.1\r\n");
// body == b"GET /\r\n"
Path::trim_prefix — path version; returns the original path if the prefix doesn't matchuse std::path::Path;
let p = Path::new("/usr/local/bin/rustc");
let rest = p.trim_prefix("/usr");
// rest == "/local/bin/rustc" (a &Path, not an Ok(...))
// Prefix absent → returns the original path unchanged
assert_eq!(p.trim_prefix("/etc"), p);
bool::toggle — flip a boollet mut on = true;
on.toggle(); // on == false
on.toggle(); // on == true
UnsafeCell::{replace, as_ref_unchecked, as_mut_unchecked} — unsafe but convenientuse std::cell::UnsafeCell;
let cell = UnsafeCell::new(42);
let old = unsafe { cell.replace(100) }; // old == 42, cell now contains 100
Once::default — one-time initialization with less ceremonyuse std::sync::Once;
let once: Once = Once::default();
once.call_once(|| init());
// Get the main-thread handle of a child process
use std::os::windows::process::CommandExt;
let handle = child.main_thread_handle();
// Show/hide a process window
let mut cmd = std::process::Command::new("myapp");
cmd.show_window(true);
Next solver enabled by default in orphanck — the type-checking rule that decides where trait implementations may live. Projects that hit issues can opt out for now:
# .cargo/config.toml / rustflags — temporary escape hatch
[unstable]
next_solver_in_orphanck = false
Sample-based profile-guided optimization (-Cprofile-sample-use) is stable — you can now ship PGO binaries with a stabilized flag.
# 1. Build with instrumentation
RUSTFLAGS="-Cprofile-generate" cargo build --release
# 2. Run a representative workload → produces *.profraw files
./target/release/myapp
# 3. Merge the profiles
llvm-profdata merge *.profraw -output=app.profdata
# 4. Rebuild with the profile (word of caution: only combine
# -Cprofile-use=... with -Cprofile-sample-use=... if your
# LLVM toolchain supports both — usually you pick one)
RUSTFLAGS="-Cprofile-use=app.profdata" cargo build --release
aligned_fields_in_packedWhat: #[repr(packed)] disables padding between fields for structs that map to wire/disk formats. Putting a highly-aligned field (like u64) inside a packed struct was previously an error; it is now a deny-by-default lint, so the compiler gives a clearer, actionable message.
#[repr(packed)]
struct Bad {
#[repr(align(8))] // ⚠️ now a lint: aligned field inside packed struct
a: u64,
b: u8, // will still get non-aligned reads → risk
}
// Fix: pick ONE representation that matches what you need
#[repr(align(8))] struct Fixed1 { a: u64, b: u8 } // aligned, padded
#[repr(packed)] struct Fixed2 { a: u64, b: u8 } // packed as-is
| Target | Status | Example |
|---|---|---|
wasm32-wasip3 | Tier 2 | cargo build --target wasm32-wasip3 |
i686-pc-windows-gnu | Tier 2 (no host tools) | rustup target add i686-pc-windows-gnu |
powerpc64-sony-ps3 | Tier 3 | Experimental — no safety guarantees |
rustup update stablecargo check --all-features --all-targetsbox patterns: let box x → let x = *boxtarget/ to cargo metadata / --message-format=json[registry] global-min-publish-age = "24 hours" in CI[lints.cargo] unused_dependencies = "warn" and clean up findingsNovember 12, 2026. Written for the DevOps & Operations section of tobias-weiss.org.