Add a minimal freestanding object example
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
## Why
Wave documents freestanding targets and can emit freestanding object files, but `examples/` does not contain a minimal example dedicated to that workflow. Existing freestanding coverage lives in the test corpus and is intentionally much more complex than a first example should be.
## Scope
Add a small freestanding Wave example that can be compiled to an object file with an existing `*-unknown-none-elf` target.
The example should:
- avoid hosted runtime, libc, filesystem, network, and standard output dependencies;
- contain a small deterministic function or data transformation that is meaningful when emitted as an object;
- document the exact `wavec build --freestanding --emit=obj --target ...` command;
- optionally document a standard object-inspection command when the required LLVM/binutils tool is already available.
Do not add startup code, a linker script, boot logic, or QEMU execution. The broader freestanding startup and system-smoke work remains tracked separately, including #371 for RISC-V.
## Completion criteria
- [ ] The source passes `wavec check` for the selected freestanding target.
- [ ] The documented command emits a relocatable object successfully.
- [ ] The example has no accidental hosted or libc dependency.
- [ ] Its README or examples index explains that object emission is the end of this example's scope.
- [ ] Existing freestanding test cases and startup work remain unchanged.
Contributor guide
Research direction
Start in examples/ and compare the existing freestanding coverage in the test corpus, then inspect the documented wavec build options for the selected *-unknown-none-elf target. Verify the example with wavec check and run wavec build --freestanding --emit=obj --target ...; done means a relocatable object is emitted without hosted or libc dependencies and the README or examples index states that object emission is the scope.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100