Introduction
monkey-c-rs is a set of developer tools for Monkey C, the language used to
build apps for Garmin devices with the Connect IQ SDK. Everything ships as a
single command line tool called rafiki:
rafiki fmtformats your code.rafiki lintfinds common mistakes and can fix many of them for you.rafiki serverbrings both into your editor as a language server.rafiki coverageshows which functions your unit tests run.
Why it exists
Monkey C has been around since 2014, but it still lacks the tooling most languages take for granted. The Connect IQ SDK comes with a compiler and an editor extension for code navigation, but there is no formatter or linter.
This project fills that gap. It starts from a full parser for the language and builds the tools on top of it, taking inspiration from ruff and rustfmt. The tools are fast and work out of the box with sensible defaults, so there’s little to configure. See Design principles for the reasoning behind them.
Status
The tools are usable today, but nothing is stable yet. Output and settings can still change between versions, so pin the version you install. See Getting started for how.
Some things aren’t supported yet:
- A VS Code extension. Until there is one, the language server works with any editor that can start a custom server. See Editor integration.
Feedback
Bug reports and ideas are welcome, whether it’s a formatting choice you disagree with, a lint rule you’d like or something that doesn’t work. Please open an issue on GitHub.