The Rust compiler for the NC programming language.
- Rust 73.5%
- nesC 24%
- Shell 2.2%
- Makefile 0.2%
- Nix 0.1%
|
|
||
|---|---|---|
| examples | ||
| scripts | ||
| src | ||
| std | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE | ||
| Makefile | ||
| nc.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
NC Compiler (NCC)
The Rust compiler for the NC programming language.
Building
cargo build --release
Usage
./target/release/ncc <run|build|check> <file>
run: Run the program.build: Build the program.check: Check the program.
Nix
This repository ships a Nix flake with a pinned Rust toolchain
(rust-toolchain.toml) and a bundled standard library.
# Build the compiler (std is installed alongside the binary)
nix build
# Run it directly — no clone of the std needed, NCC_HOME is wired up
nix run . -- run examples/md5.nc
# Reproducible dev environment (rustc, cargo, clippy, rustfmt,
# rust-analyzer, a C toolchain and make)
nix develop
# Lint, format check and the test suite
nix flake check
With direnv installed, direnv allow auto-loads the dev
shell via .envrc.