Skip to content
/ Whale Public

Whale is a general-purpose low-level toolchain written in Rust, designed to support the development of various compilers and low-level software, including Wave.

License

Notifications You must be signed in to change notification settings

wavefnd/Whale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whale Toolchain

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.

Key Components

  • 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.

Project Philosophy

Whale is built on the belief that modern systems programming deserves a toolchain that is:

  1. Modular: Every component is a reusable Rust crate.
  2. Transparent: Built from scratch to eliminate the "black box" nature of legacy toolchains.
  3. Performant: Leverages Rust's memory safety and zero-cost abstractions for maximum efficiency.

Getting Started

Installation

cargo build --release

Basic Usage

1. Assemble Source

# 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.bin

2. Create Object from Binary

whale object input.bin -o output.o

3. Link Objects (Experimental)

whale link obj1.o obj2.o -o executable

Documentation

Detailed CLI documentation can be found in the docs/cli directory:

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Whale is a general-purpose low-level toolchain written in Rust, designed to support the development of various compilers and low-level software, including Wave.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published