This repository contains Pydrofoil, an experimental emulator for various instruction set architectures. The best tested one is a RISC-V emulator based on the Sail RISC-V ISA model. It achieves fast performance by doing dynamic binary translation (aka just-in-time compilation) from RISC-V guest instructions into host machine instructions. It's built on top of the RPython meta-jit compiler and reuses all its optimizations, backends, etc. The emulator is complete enough to boot (an old version of) Linux up to the login prompt.
It also contains an even more experimental emulator for Aarch64 version 9.4, based on the Sail ARM ISA model, which is itself automatically generated from the ASL code that ARM provides. Booting Linux on that emulator is possible, at least up to the point where the init process starts.
The most recent ISA that is experimentally supported is CHERIoT, a variant of the 32-bit CHERI-RISC-V ISA aimed at supporting secure IoT devices.
See https://docs.pydrofoil.org for the complete documentation. To read a more thorough description of how the project works, please refer to our preprint.
If you want to cite this work, please use the following bibtex snippet:
@InProceedings{bolztereick_et_al:LIPIcs.ECOOP.2025.3,
author = {Bolz-Tereick, Carl Friedrich and Panayi, Luke and McKeogh, Ferdia and Spink, Tom and Berger, Martin},
title = {{Pydrofoil: Accelerating Sail-Based Instruction Set Simulators}},
booktitle = {39th European Conference on Object-Oriented Programming (ECOOP 2025)},
pages = {3:1--3:31},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-373-7},
ISSN = {1868-8969},
year = {2025},
volume = {333},
editor = {Aldrich, Jonathan and Silva, Alexandra},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2025.3},
URN = {urn:nbn:de:0030-drops-232962},
doi = {10.4230/LIPIcs.ECOOP.2025.3},
annote = {Keywords: Instruction set architecture, processor, domain-specific language, just-in-time compilation, meta-tracing}
}