Install Symvasi
Get the Symvasi compiler toolchain up and running in under a minute.
Prerequisites
1.
Rust toolchain
Install via rustup.rs. Symvasi requires Rust 1.70+.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2.
Git
To clone the Symvasi repository.
Installation
Option 1: Install from source (recommended)
$ git clone https://github.com/SUM-INNOVATION/symvasi.git
$ cd symvasi
$ cargo install --path crates/symvasi-cli
This installs the sym binary to ~/.cargo/bin/, which should already be in your PATH.
Option 2: Build without installing
$ cargo build --release
The binary will be at ./target/release/sym
Verify Installation
$ sym version
sym 0.1.0 (Symvasi compiler toolchain)
CLI Commands
| Command | Description |
|---|---|
| sym build <file.sym> | Compile a .sym file (outputs IR in v0.1, WASM planned) |
| sym check <file.sym> | Type-check and run static analysis without compiling |
| sym lex <file.sym> | Show the token stream (debugging) |
| sym parse <file.sym> | Show the AST (debugging) |
| sym fmt <file.sym> | Format a .sym file (planned) |
| sym help | Show help message |
Write Your First Contract
Create a file called hello.sym:
hello.sym
1contract Hello {2 pub storage greeting: String34 @init5 fn deploy() {6 self.greeting = "Hello, SUM-Chain!"7 }89 @view10 pub fn get() -> String {11 self.greeting12 }13}Check it:
$ sym check hello.sym
✓ hello.sym — no issues found
Build it:
$ sym build hello.sym
Σ Built hello.sym → hello.ir
Project Structure
The Symvasi compiler is organized as a Cargo workspace:
symvasi/
crates/
symvasi-lexer/# tokenizer
symvasi-parser/# AST + recursive descent parser
symvasi-checker/# type checker + static analysis
symvasi-codegen/# IR generation (WASM planned)
symvasi-cli/# sym command-line tool
examples/# example .sym contracts
You're ready!
The toolchain is installed. Now learn the language: