Download and install the pre-compiled standalone binaries (Linux x64):
curl -sSL https://raw.githubusercontent.com/pd241008/Neuro/main/install.sh | bashNote: Make sure to add ~/.neuro/bin to your PATH after installation.
# Most common command — compile a Neuro source file
neuro compile source.nro
# Launch the interactive REPL
neuro guineuro --help
Usage: neuro <COMMAND>
Commands:
compile Compiles a source file through the full pipeline
audit Runs only the security audit phase on a pre-compiled AST
gui Launches the interactive Neuro REPL
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
NEURO is a blazing-fast, polyglot Compiler Pipeline designed with a "security-first" philosophy.
Accomplished 100% memory safety and logical validation before code generation, as measured by a zero-trust semantic analysis phase, by orchestrating strict borrow-checking and scope validation rules entirely within the Rust Middle-End.
The pipeline is split across three isolated micro-architectures: a C# Frontend (Lexing & Parsing), a Rust Middle-End (Zero-Trust Security Audit), and a C++ Backend (LLVM IR Lowering). The orchestrator coordinates these tools mathematically guaranteeing logic and memory safety, while eliminating general-purpose vulnerabilities by strictly defining expression boundaries.
- ⚡ World-Class DX: Visually stunning terminal interfaces and precise, tutor-like error reporting using
miette. - 🛡️ Zero-Trust Middle-End: Mathematically guarantees logic and memory safety before a single line of target code is generated.
- 🔒 Domain-Specific Constraints: Eliminates general-purpose vulnerabilities by strictly defining expression boundaries.
graph LR
A[Source Code] --> B(neuro_cli - Rust)
B --> C(frontend - C#)
subgraph frontend [The Lexer & Parser]
C --> C1[Lexing]
C1 --> C2[Parsing]
C2 --> C3[Raw AST]
end
C3 --> D(analyzer - Rust)
subgraph analyzer [The Auditor]
D --> D1[Security Audit]
D1 --> D2[Verified AST]
end
D2 --> E(backend - C++)
subgraph backend [The Translator]
E --> E1[Lowering]
E1 --> E2[LLVM IR]
end
E2 --> F[Executable]
F -.-> G(runtime - C)
style frontend fill:#1e1e1e,stroke:#239120,stroke-width:2px
style analyzer fill:#1e1e1e,stroke:#f74c00,stroke-width:2px
style backend fill:#1e1e1e,stroke:#00599c,stroke-width:2px
neuro_cli(The Orchestrator) [Rust]: Handles file I/O, progress visuals, multi-threading, and triggers the compilation phases.frontend(The Lexer & Parser) [C#]: Responsible for lexical analysis, hand-written recursive descent parsing, and initial error reporting. Generates the initial Protobuf AST.analyzer(The Security Auditor) [Rust]: Performs the Zero-Trust Security Audit, memory-safety checks, and AST validation.backend(The Translator) [C++]: Ingests the proven AST and lowers it into highly optimized target code (LLVM IR).runtime(The Foundation) [C]: Provides low-level memory management and I/O primitives for the generated executables.
- Scaffold Rust Workspace.
- Wire crate dependencies.
- Cyberpunk-style terminal visuals (
clap,indicatif).
- Syntax Design: Mapping keywords (
fn,let,mut,type). - Grammar Specification: Formal EBNF rules.
- Security Rules: Defining rejection criteria for unsafe patterns.
- The Lexer: High-performance C# memory-scanner with offset tracking.
- The Parser: Hand-written recursive descent parser outputting Protobuf AST.
- DX Integration: Structure errors for
miettereporting in Rust.
- Scope stack management and Variable lookup implementation.
- Generate Rust types from
shared_ast/ast.proto(prost). - Recursive AST traversal and type resolution mapping.
- Variable move semantics (read/write after move detected) via Borrow Checker.
- Structured
NeuroErrordiagnostics withmiette.
- Extend
ast.protowith resolved type annotations. - Parse enriched Protobuf AST in
backend/main.cpp. - Lower Functions, Variables, Binary arithmetic, Comparisons to LLVM IR.
- Lower Control Flow (
IfStmt,WhileStmt) and I/O (Printf,Scanf). - Build runtime library and compile
.ll→.o→ executable.
- Isolate dependencies into standalone executables.
- Continuous Integration release pipeline via GitHub Actions.
- One-line global installer script for fast user onboarding.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Built with ☕ by the Prathmesh Desai