Logo

RIF - Retargetable ISA Foundry

RIF is a low-level framework designed to abstract the creation of toolchains (assemblers, linkers, compilers) without the rigid coupling to a specific CPU architecture. The premise is to transform ISA definitions into an automated production system through configuration tables and extensible plugins.


Architecture and Capabilities

The system decouples core logic (parser, linker, emitter) from hardware specifications, allowing architectures to be modeled via declarative .pack tables.


Core Components

RIF abstracts complexity through a modular structure:


Integration and CLI

The tool is designed for professional/enthusiast development environments, enabling a complete lifecycle from the terminal:

# Editable installation
python -m pip install -e .

# Build projects and invoke emulators via plugin
python -m rif build examples/gba --plugin gba --name example
python -m rif -pcli gba run examples/gba/gba.gba -nd

VSIX Automation

RIF includes an integrated extension generator that bundles metadata, TextMate syntax, and local documentation. This allows any defined architecture to immediately have a functional editing environment:

python -m rif compile --vscode --ext .gbasm -icon icon.png --p gba sound fonts basics

For detailed technical references and internal API documentation, consult the local portal generated by the rif help command.