Programming Language

Nocter

A self-contained systems language built around simplicity, encapsulation, and foolproof design.

Nocter Compiler Workspace

This directory contains the active Rust workspace for the Nocter compiler, language server, native backend, package tooling, and conformance suite.

Authorities

This file is only the workspace entry point. It does not duplicate language rules, compiler-stage contracts, or milestone status.

  • spec/ is the sole authority for public language, platform, CLI, diagnostic, and editor behavior.
  • std owns compiler-checked standard-library declarations and declaration documentation, and assigns longer observable subjects to behavior guides.
  • Compiler architecture owns the pipeline, dependency direction, and cross-stage authority rules.
  • Checked program design, target and executable program design, and machine program design own their detailed stage contracts.
  • Execution contract design owns the boundary between authored callable guarantees, checked execution facts, primitive facts, and their consumers.
  • Semantic presentation design owns the compiler-to-editor presentation boundary.
  • Cargo.toml is the canonical workspace-member list. Crate manifests and public Rust APIs are the canonical dependency and implementation surface.
  • Each workspace crate's README.md owns that crate's responsibility, input/output contract, internal responsibility split, and local invariants. It may name another crate only through that crate's exported contract.
  • The milestone catalog links each scope and its completion gates; publication records own frozen release evidence; the handoff owns only the next concrete work and current blockers.

The compiler derives behavior from the current specification. The implementation removed before v0.14.0 remains available through Git history only and is not a behavioral or architectural input.

Dependency Direction

source and discovery
  -> syntax and declarations
  -> checking
  -> target validation and executable specialization
  -> MIR
  -> machine program
  -> ARM64 and Mach-O emission

Source projection, diagnostics, editor analysis, command composition, and package acquisition are side authorities with explicit inputs. They cannot create a second semantic pipeline or let a later stage reinterpret an earlier stage's private representation. The architecture document owns the complete boundary rules.

Crate Documentation

Every workspace member has a colocated README.md. Start with crates/nocter-session/README.md for compiler orchestration, crates/nocter-checking/README.md for semantic checking, crates/nocter-analysis/README.md for editor queries, or crates/nocter-machine/README.md for native lowering. The workspace manifest, rather than a copied crate list, remains the membership authority.

Reusable source corpora are documented under tests/. Test assertions remain in the consuming crate; that directory owns only physical non-Rust inputs shared across those tests.

Verification

Run the complete gate from the repository root:

development/verification/verify-compiler.sh

For change feedback before the complete gate, run:

development/verification/verify-compiler.sh --fast

The gate shares one temporary external Cargo target across formatting, warnings-denied Clippy, workspace tests, no-default-features checking, and Rust documentation, then removes it. Complete verification therefore cannot accumulate obsolete hash generations in the workspace.

Focused Cargo commands may use development/compiler/target/ for a fast inner loop. The directory is ignored by Git and is a disposable cache, not repository state. Development builds retain line tables, test executables omit debug payload, and both profiles disable incremental object graphs. Reclaim stale local generations without touching source or release artifacts with:

cargo clean --manifest-path development/compiler/Cargo.toml

The development verification contract owns this cache lifecycle. Release qualification independently uses fresh external targets and removes them after verification so clean-build evidence does not become a persistent workspace cache.