Status: Early implementation — syntax, type checker, bytecode VM runtime, concurrency primitives, and stdlib/IO modules are functional.
Current execution model: Bytecode VM only. coco run type-checks and executes source via the VM path. coco build emits a .cb artifact via coco_interpreter::serialize_chunk; coco build --disasm prints bytecode disassembly. The old AOT/LLVM backend and coco build --binary are not present.
Coco is a memory-safe, gradually typed language for backend services, CLI tools, and automation. It targets JS/TS/PHP developers who want memory safety without Rust's learning curve.
cargo build
cargo run -- hello.co
cargo testcrates/coco_cli: CLI binarycrates/coco_parser: parsercrates/coco_typeck: gradual type checkercrates/coco_interpreter: bytecode compiler, stack VM,.cbserializationcrates/coco_formatter: formattercrates/coco_syntax: AST definitionstests/:.cointegration tests
bash scripts/package-linux.sh
sudo dpkg -i dist/linux-amd64/coco_*.debbash scripts/package-macos.sh
sudo installer -pkg dist/macos-<arch>/coco-<version>-<arch>.pkg -target /powershell -ExecutionPolicy Bypass -File .\scripts\package-windows.ps1Extract dist\windows-amd64\coco-<version>-windows-amd64.zip and place coco.exe on your PATH.
cargo build --release
sudo install -m 0755 target/release/coco /usr/local/bin/cococargo buildcargo run -- hello.cocargo testSingle crate tests:
cargo test -p coco_interpreter
cargo test -p coco_typeck| Command | Notes |
|---|---|
coco lex FILE.co |
Tokenize |
coco parse FILE.co |
Print AST |
coco fmt FILE.co |
Format |
coco fmt -w FILE.co |
Format in-place |
coco check FILE.co |
Parse + diagnostics |
coco typecheck FILE.co |
Type checking |
coco safety FILE.co |
Safety analysis |
coco run FILE.co |
Type-check + VM execute |
coco run --no-check FILE.co |
VM execute without checks |
cargo run -- build FILE.co |
Serialize .cb |
cargo run -- build --disasm FILE.co |
Bytecode disassembly |
- Memory safety by default
- Optional gradual typing
- Safe concurrency primitives
- Practical bytecode VM performance
- Explicit future compatibility; no backward-compat hacks
Near-term:
- Finalize safe error-runtime behavior on VM paths
- Complete project graph resolution for multi-file builds
- Stabilize stdlib/host integration
- Add APC advisory coverage where
apc-advisoryis enabled
Deferred:
- Runtime package management surface
- Self-hosting compiler
- JIT/WASM output
- AOT/native-backend research is explicit, tracked, and not currently enabled
See CONTRIBUTING.md.