Repository navigation
Contributing
github-actions[bot] edited this page Oct 10, 2026
·
1 revision
Thanks for helping! MicroCS runs on devices where a crash means a bricked field unit, so the bar is "tested and honest" rather than "big".
-
make checkstays green — tests, GC-stress run and all feature-flag builds with-Werror. -
Behaviour is defined by
.outfiles. A new language feature needs a test; if it is plain C#, its output must be byte-identical to .NET (tools/verify_dotnet.sh). -
Docs describe the code, not the plan. Label anything unfinished as 🧪 experimental or
🗓️ planned. Every number must come from a command in
docs/PERFORMANCE.md. - C99, no dependencies, no global state in the core (state lives in the VM; modules use extension slots).
-
Public API is append-only (
include/mcs.h); opcodes are append-only and a format change bumpsIMG_VERSION.
make check # must pass
make asan-test # sanitizers (then `make clean && make`)
python3 tools/fuzz.py ./mcs 1000 $RANDOM # for parser/compiler/VM changes
tools/verify_dotnet.sh # for language/library changes (needs dotnet 8)
make cm-check # for anything that could affect 32-bit targets
python3 tools/gen_stdlib_doc.py > docs/STDLIB.md # after adding library members| Change | Code | Docs / tests |
|---|---|---|
| New syntax |
src/mcs_lexer.c, src/mcs_parser.c (desugar if possible), src/mcs_compiler.c
|
docs/LANGUAGE.md, tests/t*.cs
|
| New library member |
src/mcs_lib*.c registration tables |
regenerate docs/STDLIB.md, add to a test |
| New opcode | append to MCS_OPCODES in src/mcs_internal.h, VM case, disassembler, loader validation |
docs/BYTECODE.md |
| New module / peripheral |
modules/<name>/, public headers only, MCS_ENABLE_<NAME> flag |
docs/<NAME>.md, FLAG_SETS in the Makefile |
| New port | ports/<target>/ |
docs/PORTING.md |
4-space indent, K&R braces, snake_case, mcs_ prefix for anything public, comments that
explain why. Keep hot paths in src/mcs_vm.c allocation-free and remember that the GC only
runs at safepoints — new roots must be reachable from mark_roots.
Generated from the MicroCS repository - edit the files there, not in the wiki.
Start here
Step-by-step guides
- Guides
- Guide PC Simulator
- Guide ESP32
- Guide ESP32 C3 OLED
- Guide Raspberry Pi Pico
- Guide STM32
- Guide Arduino
- Guide Zephyr
- Guide Peripheral Settings
- Guide DMA
Hardware
- Hardware API
- Power Management
- Bluetooth LE
- Peripheral Configuration
- DMA
- Device Drivers
- Wi Fi and Networking
- U8g2 Displays
- Filesystem
- Threads
- Scheduler
Ports
- Porting and Build Systems
- Port ESP32
- Port RP2040 RP2350
- Port STM32
- Port STM32 Firmware
- Port Zephyr
- Port Arduino
C# and the runtime
Embedding and tuning
Internals
Project