Skip to content

Build without std, and 0.4.5 - #6

Merged
pathscale merged 4 commits into
masterfrom
feat/no-std
Sep 7, 2026
Merged

pathscale merged 4 commits into
masterfrom
feat/no-std

Conversation

@pathscale

Copy link
Copy Markdown
Owner

An adaptive radix tree over raw pointers and atomics. Nothing in it needed an operating system, and it linked one anyway — which is what stopped every consumer that wanted to be no_std from being it.

core::   ptr, mem, marker, fmt, hint, cmp, slice, arch, alloc::Layout
alloc::  Arc, Vec, Box, format!, the allocator calls

The two things that genuinely wanted std

  • debug_print writes to stdout, so it is behind the feature.
  • thread::yield_now in the spin backoff falls back to core::hint::spin_loop() when there is no scheduler to yield to. That is the same instruction the fast path directly above it already executes, minus the syscall.

stats keyed its per-level counters by depth in a HashMap. It is a BTreeMap now — the same map without a hasher, and the one alloc has.

serde and ps-reclaim arrive with default features off and get std back through this crate's own feature, which is default-on, so nothing downstream changes unless it asks.

default                  congee-wt [default,std]  ps-reclaim [libc,spin,std]
--no-default-features    congee-wt []             ps-reclaim [libc,spin]

Doc examples still say std::, deliberately: a doctest compiles as a consumer, and a consumer has one.

What no_std does not mean here

It does not mean bare metal. ps-reclaim keeps its participant slot in thread-local storage and its no_std path is pthread keys, so this still needs an operating system — x86_64-unknown-none stops at ps-reclaim, not at this crate. no_std is a statement about the standard library, not about a class of hardware.

Checks

cargo test                     103 + 7 + 39 passed, 0 failed
clippy, std and no_std         clean
cargo fmt --check              clean

Version 0.4.5. Also carries the house working agreement (AGENTS.md, CLAUDE.md), which was sitting unpushed locally.

Companion to pathscale/WorkTablesIndex (same port) and pathscale/parking_lot_lite_hack#3. worktable-vec is the consumer that wanted both: pathscale/WorkTable-vec#4 currently has to declare that its congee and wti features imply std, and this is half of what removes that.

meh added 3 commits September 7, 2026 17:53
The crate is an adaptive radix tree over raw pointers and atomics. Nothing in
it needed an operating system, and it linked one anyway, which is what kept
every consumer that wanted to be no_std from being it.

    core::  for ptr, mem, marker, fmt, hint, cmp, slice, arch, alloc::Layout
    alloc:: for Arc, Vec, Box, format, the allocator calls

Two things genuinely wanted std and now say so:

  - `debug_print` writes to stdout, so it is behind the feature.
  - `thread::yield_now` in the spin backoff falls back to `spin_loop` when
    there is no scheduler to yield to. That is the same instruction the fast
    path above it is already executing, minus the syscall.

`stats` keyed its per-level counters by depth in a `HashMap`; it is a
`BTreeMap` now, which is the same map without a hasher and is what `alloc`
has. `serde` and `ps-reclaim` arrive with default features off and get `std`
back through this crate's own.

Doc examples still say `std::`, because a doctest is compiled as a consumer
and a consumer has one.

    cargo test                       103 + 7 + 39 passed, 0 failed
    clippy, std and no_std           clean
    default -> ps-reclaim [libc,spin,std];  no_std -> [libc,spin]
`"^0.1, >=0.1.4"` and `"0.1.4"` describe the same set. The second is the form
the rest of the house uses.

    cargo test                     103 passed
    cargo test --no-default-features  103 passed
@pathscale
pathscale merged commit 6d67225 into master Sep 7, 2026
8 checks passed
@pathscale
pathscale deleted the feat/no-std branch September 7, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant