Skip to content

feat(std): establish a portable versioned standard library foundation - #422

Merged
LunaStev merged 4 commits into
wavefnd:masterfrom
LunaStev:feat/std-foundation-upgrade
Aug 29, 2026
Merged

LunaStev merged 4 commits into
wavefnd:masterfrom
LunaStev:feat/std-foundation-upgrade

Conversation

@LunaStev

Copy link
Copy Markdown
Member

Summary

This PR completes the current standard-library foundation work and extends it into a portable OS and architecture provider model.

  • defines documented public std::fs and std::io APIs with runnable file examples
  • makes std updates compatibility-versioned, staged, validated, transactional, and rollback-safe
  • separates portable APIs from OS providers and architecture-specific syscall ABIs
  • adds Linux amd64, arm64, and riscv64 providers
  • adds macOS amd64 and arm64 providers
  • adds an initial FreeBSD amd64 provider and compiler target
  • adds architecture-neutral Windows Win32 and Winsock providers shared by x86-64 and ARM64
  • adds the aarch64-w64-windows-gnu compiler target and extern(system) ARM64 handling
  • expands native, cross-target, corpus, example, and CI coverage

Issue coverage

Standard-library layering and contracts

  • keeps user-facing modules independent from raw syscall providers
  • documents public std and libc surfaces with short usage-oriented comments
  • centralizes OS and architecture selection through target attributes
  • rejects duplicate target keys and canonicalizes OS and architecture aliases

Version-aware transactional std updates

  • adds a standard-library compatibility revision manifest
  • rejects incompatible installed std revisions with an actionable diagnostic
  • stages and validates the complete Wave source tree before activation
  • records installation source metadata
  • atomically replaces an installation and restores the previous tree on activation failure
  • adds replacement and rollback regression tests with isolated HOME directories

User-facing filesystem API

  • adds portable open, create, read, write, append, copy, rename, metadata, directory, and removal helpers
  • provides fixed-buffer and growable-buffer read paths
  • updates the file I/O example to the public API
  • adds end-to-end filesystem coverage

Additional work

  • adds FreeBSD target selection, object generation, linker planning, sysroot, and CRT handling
  • corrects Linux, Darwin, and FreeBSD termios layouts and syscall contracts
  • adds Windows file, environment, memory, process, socket, time, and tty provider surfaces
  • maps Windows standard descriptors through GetStdHandle
  • keeps Windows std implementations architecture-neutral while retaining architecture-specific LLVM and C ABI target handling
  • fixes TypedBuffer pointer arithmetic exposed by the new runtime tests
  • verifies ARM64 and x86-64 COFF machine headers independently
  • adds 11 Wave E2E cases for string, path, buffer, environment, time, math, and cross-target std object generation
  • adds 12 focused examples under examples/std
  • runs the std example suite natively on Linux amd64 and arm64, macOS amd64 and arm64, and Windows CI
  • limits Cargo CI parallelism to two jobs and applies the same example gate to release validation

Validation

  • cargo fmt --all --check
  • cargo test --locked --workspace --jobs 2
  • RUSTDOCFLAGS=-D warnings cargo doc --locked --no-deps --jobs 2
  • standard-library policy validation
  • 43 codegen regression tests
  • 167 of 167 Wave corpus files
  • 12 of 12 standard-library examples
  • 113 Wave E2E passes, 8 platform or sandbox skips, 0 failures
  • Windows x86-64 and ARM64 COFF object generation
  • git diff --check

Closes #375
Closes #379
Closes #380

@LunaStev
LunaStev merged commit c141e98 into wavefnd:master Aug 29, 2026
6 checks passed
@LunaStev LunaStev mentioned this pull request Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant