The Rust compiler for the NC programming language.
  • Rust 73.5%
  • nesC 24%
  • Shell 2.2%
  • Makefile 0.2%
  • Nix 0.1%
Find a file
Insidious Fiddler 9e23f132a7
chore: Nix flake
Signed-off-by: Insidious Fiddler <git@codycody31.dev>
2026-05-16 08:24:45 -04:00
examples refactor: require semicolons (#13) 2026-05-10 03:40:36 +00:00
scripts fix: small issues on darwin x86_64 2026-04-13 22:14:33 -04:00
src refactor: require semicolons (#13) 2026-05-10 03:40:36 +00:00
std refactor: require semicolons (#13) 2026-05-10 03:40:36 +00:00
tests refactor: require semicolons (#13) 2026-05-10 03:40:36 +00:00
.envrc chore: Nix flake 2026-05-16 08:24:45 -04:00
.gitignore chore: Nix flake 2026-05-16 08:24:45 -04:00
Cargo.lock Update dependencies to latest versions (#11) 2026-05-06 20:21:41 +00:00
Cargo.toml Update dependencies to latest versions (#11) 2026-05-06 20:21:41 +00:00
flake.lock chore: Nix flake 2026-05-16 08:24:45 -04:00
flake.nix chore: Nix flake 2026-05-16 08:24:45 -04:00
LICENSE Initial Commit 2025-12-13 21:09:25 -05:00
Makefile feat: darwin aarch64 backend (#5) 2026-03-22 18:20:41 +01:00
nc.toml Rename ncc.toml to nc.toml (#12) 2026-05-06 21:00:45 +00:00
README.md chore: Nix flake 2026-05-16 08:24:45 -04:00
rust-toolchain.toml chore: Nix flake 2026-05-16 08:24:45 -04:00

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.