Whale is a general-purpose low-level toolchain written in Rust. It is designed as a modern, lightweight backend for the Wave programming language.
| Area | Status | Notes |
|---|---|---|
Assembler (whale asm) |
Implemented | AMD64 only. Output must be an ELF object (.o). |
Object CLI (whale object) |
Implemented | Build ELF objects from binary / IR inputs. |
Linker (whale link) |
Planned | CLI stub only — prints "coming soon", no resolution or relocation yet. |
IR tools (whale ir) |
Experimental | Requires building with --features socket-cli. Subcommand: ir lower. |
Defined-behavior goals for a full native link path are tracked separately; this README only documents what the current tree actually runs.
- Whale Assembler (
asm) — AMD64 assembler with multi-section support, standard directives (global,section,extern), and ELF relocation generation into.oobjects. - Whale Object (
object) — Object-file library and CLI for sections, symbols, and ELF64 generation. - Whale Linker (
linker) — Not implemented yet (placeholder CLI). - Whale IR (
ir) — Experimental lower/print/verify demos behind thesocket-clifeature.
- Modular — Every component is a reusable Rust crate.
- Transparent — Built from scratch to avoid opaque legacy toolchain layers.
- Performant — Uses Rust's memory safety and zero-cost abstractions.
# Core CLI (asm / object / link stub)
cargo build --release
# Include experimental IR CLI (needed for `whale ir`)
cargo build --release --features socket-cliInstall the binary from target/release/whale, or run via cargo run -- ....
whale asm --amd64 input.asm -o output.oRaw .bin output is not supported by the current assembler CLI; it rejects non-.o outputs.
whale object input.bin -o output.owhale link obj1.o obj2.o -o executable
# Currently prints a stub message only.cargo run --features socket-cli -- ir lower program.json -o out.wirDetailed CLI notes live under docs/cli:
- Assembler CLI — note: some prose there still describes
.binoutput; the liveasmcommand requires.o. - Object CLI
This project is licensed under the MPL-2.0 License — see the LICENSE file for details.