Installation
Get Nebula running on your system in minutes.
Prerequisites
- Rust (1.70+): Required for building from source
- Git: For cloning the repository
- Cargo: Rust's package manager (comes with Rust)
Installing Rust
If you don't have Rust installed:
# Linux/macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Windows
# Download and run: https://rustup.rs/
Building from Source
Clone & Build
# Clone the repository
git clone https://github.com/Sxf0z/Nebula.git
cd Nebula
# Build release version (optimized)
cargo build --release
# The binary will be at:
# ./target/release/nebula (Linux/macOS)
# ./target/release/nebula.exe (Windows)
Verify Installation
./target/release/nebula --help
You should see:
Nebula - High Performance Scripting Language
USAGE:
nebula [OPTIONS] [FILE]
OPTIONS:
--vm Use bytecode VM (faster)
--help Show this message
Add to PATH (Optional)
To run nebula from anywhere:
Linux/macOS
# Add to your shell profile (.bashrc, .zshrc, etc.)
export PATH="$PATH:/path/to/Nebula/target/release"
Windows (PowerShell)
# Add to user PATH
$env:PATH += ";C:\path\to\Nebula\target\release"
VS Code Extension
For syntax highlighting and IntelliSense:
- Navigate to
nebula-vscode/directory - Install dependencies:
cd nebula-vscode npm install - Press
F5to launch in debug mode - Or package for installation:
npm run package
Your First Program
Create a file hello.na:
fn main() do
log("Hello, Nebula!")
perm name = "World"
log("Welcome,", name)
end
Run it:
nebula hello.na # Interpreter mode
nebula --vm hello.na # VM mode (faster)
Troubleshooting
Build Errors
Error: cargo not found
- Install Rust: https://rustup.rs/
Error: linker not found
- Linux:
sudo apt install build-essential - macOS:
xcode-select --install
Runtime Issues
Error: Permission denied
chmod +x ./target/release/nebula
What's Next?
- CLI Reference - Command-line options
- Basics - Language fundamentals
- Functions - Creating reusable code