Whale is a general-purpose, high-performance low-level toolchain written in Rust. It is designed to be a modern, lightweight competitor to LLVM and GCC, serving as the primary backend for the Wave programming language.
- Whale Assembler (
asm): A professional-grade assembler supporting modern instruction sets (AMD64) with advanced features like multi-section support, standard directives (global,section,extern), and precise ELF relocation generation. - Whale Object (
object): A modular object file manipulation library and CLI. It handles internal representations of sections, symbols, and relocations, providing a pure Rust implementation of ELF64 generation. - Whale Linker (
linker): A next-generation linker designed for modularity and speed. It features advanced symbol resolution, memory layout computation, and cross-object relocation processing.
Whale is built on the belief that modern systems programming deserves a toolchain that is:
- Modular: Every component is a reusable Rust crate.
- Transparent: Built from scratch to eliminate the "black box" nature of legacy toolchains.
- Performant: Leverages Rust's memory safety and zero-cost abstractions for maximum efficiency.
cargo build --release# Assemble to ELF object file
whale asm --amd64 input.asm -o output.o
# Or assemble to raw binary
whale asm --amd64 input.asm -o output.binwhale object input.bin -o output.owhale link obj1.o obj2.o -o executableDetailed CLI documentation can be found in the docs/cli directory:
This project is licensed under the MIT License - see the LICENSE file for details.