Neu is an experimental systems programming language and compiler project. The language is designed around Kotlin-like syntax and ergonomics, compile-time memory and thread safety, inferred ownership effects, structured concurrency, and a compiler implemented in Rust.
Weekend-project disclaimer: This project is largely vibe coded and began as an attempt to make a boring weekend substantially less boring. Treat the specification and compiler accordingly.
The compiler currently uses a Cranelift backend and supports host-only system
linking. It emits a host object and links it with cc; NEU_LINKER can override
the linker command. Non-host targets are rejected explicitly. The repository
itself is the compiler project, not a Neu application module.
- Rust toolchain with Rust 2024 support
- A host C compiler and linker available as
cc
cargo build --workspaceThe CLI binary is target/debug/neu.
Neu application projects use a neu.json manifest. The repository includes a
small manifest project under examples/projects/manifest_app:
cargo run -p neu -- build examples/projects/manifest_app
examples/projects/manifest_app/target/manifest.app
echo $?The example exits with status 7. An explicit output path is also supported:
cargo run -p neu -- build examples/projects/manifest_app \
--output /tmp/manifest_appThe compiler leaves an intermediate object file beside the requested output.
Runnable language examples are in examples/current,
including arithmetic, control flow, arrays, strings, functions, classes,
interfaces, enums, and ownership behavior. Some files intentionally document
accepted or deferred surfaces and are exercised by compiler tests rather than
being standalone projects.
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --all-targets
git diff --checkNeu has no garbage collector or user-visible manual allocation API. Printing, standard-library modules, FFI, slices, dynamic cross-compilation, and other deferred features are not part of the current bootstrap project contract.
The language specification is docs/SPEC.md. Accepted
architecture decisions are in docs/adr.