{"id":50494237,"url":"https://github.com/mrbandler/firmament","last_synced_at":"2026-06-02T05:31:14.051Z","repository":{"id":354714556,"uuid":"1209631734","full_name":"mrbandler/firmament","owner":"mrbandler","description":"Flight software, from the ground up.","archived":false,"fork":false,"pushed_at":"2026-04-29T17:59:49.000Z","size":76,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T19:33:54.726Z","etag":null,"topics":["educational","embedded","mcu","simulation","wasm"],"latest_commit_sha":null,"homepage":"http://mrbandler.github.io/firmament/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrbandler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-13T16:12:44.000Z","updated_at":"2026-04-29T18:02:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mrbandler/firmament","commit_stats":null,"previous_names":["mrbandler/firmament"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mrbandler/firmament","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbandler%2Ffirmament","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbandler%2Ffirmament/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbandler%2Ffirmament/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbandler%2Ffirmament/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrbandler","download_url":"https://codeload.github.com/mrbandler/firmament/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrbandler%2Ffirmament/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33808702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["educational","embedded","mcu","simulation","wasm"],"created_at":"2026-06-02T05:31:13.254Z","updated_at":"2026-06-02T05:31:14.042Z","avatar_url":"https://github.com/mrbandler.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Firmament\n\n**Flight software, from the ground up.**\n\n[![Built with Rust](https://img.shields.io/badge/Built%20with-Rust-orange.svg)](https://www.rust-lang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n[![CI](https://github.com/mrbandler/firmament/actions/workflows/ci.yml/badge.svg)](https://github.com/mrbandler/firmament/actions/workflows/ci.yml)\n\n*An embedded systems flight software education platform using KSP/KSA as a physics backend*\n\n[Documentation](https://mrbandler.github.io/firmament/) · [Contributing](./CONTRIBUTING.md)\n\n\u003c/div\u003e\n\n---\n\nYou're deep in a KSP mission. Your rocket needs to execute a suicide burn. Most mods give you something like `set_throttle(0.8)` and call it a day.\n\nFirmament doesn't do that.\n\nYou write a 32-bit value to a CAN transmit register, which sends a frame to an engine controller at bus address `0x10`, which the host maps to a KSP engine part. Your firmware reads altitude from an ADC register, runs the control loop, and fires pyrotechnics via GPIO. The firmware doesn't know KSP exists. It talks to registers, just like real flight software.\n\nFirmament is an embedded systems flight software education platform that uses KSP/KSA as a physics backend. You write bare-metal firmware in any language that compiles to WebAssembly, load it onto a virtual microcontroller, and fly.\n\nAnd if none of the above convince you this project has merit, here is my last argument: because it's cool, that's why.\n\n\u003e **Firmament is in early development.** The core runtime works, firmware runs on a virtual MCU, but the full vision (game integration, peripherals, multi-MCU, ground station) is still ahead. Star and watch to follow progress.\n\n---\n\nUnder the hood, Firmament simulates a virtual microcontroller. Your firmware compiles to WebAssembly and runs inside Wasmtime on the host. The MCU exposes the same interface you'd find on a real embedded chip: memory-mapped registers, a nested vectored interrupt controller, cycle budgets, and sleep via `wfi`.\n\nThe firmware runs as a real bare-metal program. It exports `_start`, the host calls it once, and it runs forever. There is no `tick()` callback and no scripting API. Interrupts fire at register access boundaries and sleep suspends the WASM fiber until the next interrupt wakes it.\n\nKSP/KSA or a test harness sit on the other side of the register interface. The host maps ADC channels to vessel sensors, GPIO pins to pyrotechnics, CAN bus addresses to engines and reaction wheels. The firmware never touches the game directly, it reads and writes registers and the host translates.\n\n```mermaid\ngraph TB\n    FW[\"Your Firmware\u003cbr/\u003e(WASM binary)\u003cbr/\u003e\u003cbr/\u003eReads registers\u003cbr/\u003eWrites registers\u003cbr/\u003eHandles interrupts\"]\n    GP[\"Game / Physics\u003cbr/\u003e\u003cbr/\u003eOrbital mechanics\u003cbr/\u003eAtmospheric flight\u003cbr/\u003eThermal model\u003cbr/\u003eCommNet\"]\n    MCU[\"Virtual MCU\u003cbr/\u003e\u003cbr/\u003eMMIO · NVIC · Timers · Buses\"]\n\n    FW \u003c--\u003e|\"WASM imports\u003cbr/\u003e(read/write volatile)\"| MCU\n    GP \u003c--\u003e|\"Host maps\u003cbr/\u003eregisters ↔ vessel\"| MCU\n```\n\n## Features\n\n**Hardware simulation**\nThe virtual MCU provides memory-mapped I/O, nested vectored interrupts, cycle budgets, GPIO, ADC, timers, CAN, SPI, I2C, PWM, and watchdog peripherals.\n\n**Language agnostic**\nAnything that compiles to WebAssembly works, whether that's Rust, C, Zig, or AssemblyScript.\n\n**Real firmware patterns**\nYour code runs `_start`, sleeps with `wfi`, and wakes on interrupts. No scripting API, no callbacks, just bare-metal.\n\n**Embedded Rust ecosystem**\nThe firmware crate stack mirrors the real world with PAC, HAL, BSP, and runtime layers, each independently replaceable.\n\n**No game required**\nA headless test harness lets you develop and validate firmware without KSP or KSA.\n\n## Quick Start\n\n```bash\ngit clone https://github.com/mrbandler/firmament.git\ncd firmament\n```\n\nBuild the example firmware:\n\n```bash\ncd examples/blink\ncargo build --target wasm32-unknown-unknown --release\ncd ../..\n```\n\nRun it on a virtual MCU:\n\n```bash\ncargo run --example blink_runner -p firmament-core\n```\n\nThe firmware boots, toggles a GPIO register in a loop, and the host prints the result. No game, no hardware. Just registers.\n\n## Project Structure\n\n| Crate | Description |\n|-------|-------------|\n| `firmament-core` | Host-side runtime: WASM executor, virtual MCU, MMIO, interrupts, cycle budgets |\n| `firmament-fm` | Guest-side firmware library: `no_std` WASM imports for register access, sleep, debug logging |\n\n## Contributing\n\nContributions are welcome! Please read the [Contributing Guide](./CONTRIBUTING.md) to get started.\n\n## Inspiration\n\nFirmament draws inspiration from [kOS](https://ksp-kos.github.io/KOS/) for showing that KSP can be a platform for learning through code, [The Rusty Bits](https://www.youtube.com/@therustybits) for making embedded Rust accessible, and a general enthusiasm for rockets and close-to-hardware code.\n\n## AI Transparency\n\nThis project uses AI as a development tool. All AI-generated content is reviewed and refined by a human.\n\n**AI assists with:**\n\n- Exploring ideas and concept refinement\n- Generating boilerplate code\n- Drafting documentation\n\n**AI does not write:**\n\n- Core logic and algorithms\n- Architectural decisions\n- Critical code paths\n\nI believe in transparency about AI usage while maintaining quality standards.\n\n## License\n\n[MIT](./LICENSE)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**[Star this repo](https://github.com/mrbandler/firmament)** if you think this is as cool as we do!\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbandler%2Ffirmament","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrbandler%2Ffirmament","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrbandler%2Ffirmament/lists"}