wolf-std Public
trunk
Code
Use Git or checkout with SVN using the web URL.
No matching headings.
wolf-std
The wolf standard library: the modules behind use std.*.
The library has its own release cadence. Each wolf release ships a
copy of std/ beside the compiler binary, pinned by the compiler's
crates/wolf_driver/STD-PIN. To use a checkout instead:
git clone https://github.com/wolffe-lang/wolf-std
export WOLF_STD="$PWD/wolf-std/std"
wolf run main.lu
--std-root <dir> does the same for a single invocation and overrides
WOLF_STD. The directory tree is the namespace: use std.list names
<root>/list/.
What's in it
Core: list map set deque option errors iter range cmp
sort search mem pool ops prelude
Text and data: str strbuf fmt unicode bytes hex base64
json
Numbers: math rand
The os tier: fs io net time env process os signal term
Testing: testing
std/x/ is the nursery. crypto, tls, jose and a few others live
there until their surfaces settle, and anything under x may change
without notice.
Every function names the capability it reaches and records which execution rungs run it.
The library is pre-alpha, with the compiler. The newest surfaces are
wolf 0.2.35's: std.fs's advisory locks, fifos, handle records,
non-blocking writes and reads into a caller's buffer; std.process's
core limits; std.os's name and arch. std.list's mutators work in
place.
Testing
Library code here is executed by lupin (the reference interpreter), by the compiler's checked tier, and by the compiler's native tier, which compiles, links and runs it.
The three refuse different shapes of program, so each test records
what each rung achieved. tests/ledger.toml holds those records for
all 552 tests. A test that passes deeper than its ledger entry claims
fails CI, the same as one that passes shallower, so the ledger has to
be kept accurate in both directions.
When a test finds a gap in the language, the gap is filed in
docs/findings.md and upstream. The library does not work around it.
Building
cargo xtask std-test # stage + run every test on all three rungs
cargo xtask doc-examples # every fenced ```wolf-doc-example, executed
cargo xtask ulp # std.math.float accuracy + bit-for-bit agreement
cargo xtask doctor # which binaries resolved, and whether they match the pins
cargo xtask ledger-check # every test has a ledger row, and every row has a test
cargo xtask std-test --lint-conventions # test-authoring conventions, without running tests
cargo xtask fmt-lu # wolf formatting, checked without rewriting
cargo xtask sync-pin # verify the vendored upstream snapshot against PIN
cargo xtask gen-vectors --check # verify the committed crypto vector tests
cargo xtask time-oracle # local time against the host's date command
cargo xtask ci # all of it, behind fmt/clippy/test
Toolchain binaries are looked up at run time from $LUPIN_BIN /
$WOLF_BIN, then .wolf-bin/, then PATH. A rung whose binary is
missing reports SKIP: no lupin at pin … and is counted as skipped.
The native rung also needs the runtime staticlib beside the wolf
binary (or $WOLF_RT_LIB) and skips the same way without it. Its name
is rustc's own spelling per target — wolf_rt.lib on windows,
libwolf_rt.a everywhere else — which is what every release archive
ships; a rig that knew only one of the two reported a lane dark at a
file it could see (wolf-std#18).
upstream/ is the wolf-lang submodule (sparse spec/ and corpus/),
vendor/upstream/ the snapshot CI reads, and vendor/tools.toml the
binary pins. Surface conventions are in
API-CONVENTIONS.md.
License
GPL-3.0-or-later with the wolf Runtime Library Exception. The standard library compiles into your programs, and your programs are yours, under any license you choose. The wolf Training Data Permission lets you train models on this repository's text and ship excerpts of it in datasets under CC BY 4.0.