Repository navigation
Closed
Labels
discussionIssues that require a technical or community discussion.enhancementA request for a new feature or improvement.
Description
Problem
The Wave standard library currently mixes raw operating-system primitives, descriptor helpers, and user-facing APIs. Names such as fs_open inside std::fs::file repeat module context, while functions such as fs_read_all expose caller-managed buffer contracts that are not obvious from their names.
The public boundary should be decided before broad API expansion.
Proposed layers
- std::sys: target-specific operating-system primitives and ABI contracts.
- std::io: descriptor, stream, buffering, and byte transport helpers.
- std::fs: user-facing file and directory operations.
- std::libc: explicit C library bindings, separate from direct system providers.
std::sys may contain source-auditable platform work before the compiler can execute that target. Unsupported targets must remain clearly gated and must not be advertised as runnable.
Decisions required
- Naming and prefix rules inside namespaced modules.
- Public re-export policy between sys, io, fs, net, process, and time.
- Path-based versus descriptor-based operation names.
- Error conventions before and after runtime variant lowering is available.
- Ownership rules for strings, buffers, handles, and allocated results.
- Compatibility and migration policy for pre-beta API changes.
Workstreams
- Document the public Wave standard-library API surface #376
- Add runnable examples for path-based and descriptor-based file I/O #377
- Add a standard-library system capability matrix #378
- Make standard-library updates version-aware and transactional #379
- Redesign std::fs as a user-facing file API #380
- Add process identity primitives to std::sys #381
- Add missing filesystem mutation primitives to std::sys #382
- Add system randomness providers and a portable std::random API #383
- Add target-gated signal primitives to std::sys #384
- Track remaining Windows std::sys provider work #385
- Complete and validate FreeBSD std::sys providers #386
- Port the Linux standard-library syscall layer to RV64 #370
- Add WASI execution and standard-library platform contracts #367
Completion criteria
- A short standard-library architecture document defines every layer.
- Public naming and re-export rules are explicit.
- Raw platform APIs cannot be mistaken for portable APIs.
- File I/O examples map clearly to their declared signatures.
- Follow-up implementation issues cite this contract.
Metadata
Metadata
Assignees
Labels
discussionIssues that require a technical or community discussion.enhancementA request for a new feature or improvement.
Activity