Internal Development Documentation
This directory contains internal documentation for SolScript compiler development.
For user-facing documentation, see /documentation/.
Contents
| Document | Purpose |
|---|---|
| specs.md | Language specification - syntax, semantics, type system |
| roadmap.md | Implementation status and planned features |
| design-decisions.md | Resolved design choices and conventions |
Quick Reference
Crate Structure
crates/
├── solscript-ast/ # AST node definitions
├── solscript-parser/ # pest grammar + parsing
├── solscript-typeck/ # Type checking + inference
├── solscript-codegen/ # Rust/Anchor code generation
├── solscript-bpf/ # Direct LLVM BPF compilation
├── solscript-lsp/ # Language server
└── solscript-cli/ # CLI tool
Build Commands
# Build all crates cargo build # Run tests cargo test # Build with LLVM support (requires LLVM 18) cargo build -p solscript-bpf --features llvm # Run the CLI cargo run -p solscript-cli -- check examples/counter/counter.sol
Adding New Features
- Update grammar in
crates/solscript-parser/src/grammar.pest - Add AST nodes in
crates/solscript-ast/src/ - Update parser in
crates/solscript-parser/src/lib.rs - Add type checking in
crates/solscript-typeck/src/ - Add codegen in
crates/solscript-codegen/src/ - Update
specs.mdwith the new syntax/semantics