Skip to content

Installation

Get GScript up and running on your system.

Prerequisites

Before installing GScript, ensure you have:

  • Rust toolchain (1.70 or later)
  • Git for cloning the repository
  • A text editor (VS Code recommended for LSP support)

Installation Methods

Clone and build GScript from source:

bash
# Clone the repository
git clone https://github.com/Parametrix-Labs/gscript-core
cd gscript-core

# Build the project in release mode
cargo build --release

# The CLI tool will be at target/release/gscriptc

Add to your PATH for easy access:

bash
# On Linux/macOS
export PATH="$PATH:$(pwd)/target/release"

# Or copy to a system directory
sudo cp target/release/gscriptc /usr/local/bin/

On Windows:

powershell
# Add to PATH via System Environment Variables
# Or copy to a directory already in PATH
copy target\release\gscriptc.exe C:\Windows\System32\

Method 2: Install via Cargo (Coming Soon)

Once published to crates.io:

bash
cargo install gscript

Method 3: Download Pre-built Binaries (Coming Soon)

Download pre-built binaries from the releases page.

Available for:

  • Linux (x86_64)
  • macOS (x86_64, ARM64)
  • Windows (x86_64)

Verify Installation

Check that GScript is installed correctly:

bash
gscriptc --version

You should see output like:

gscript 0.1.0

IDE Support

VS Code Extension

Install the GScript VS Code extension for syntax highlighting, validation, and autocomplete:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "GScript"
  4. Click Install

Or install from source:

bash
cd gscript-vscode
npm install
npm run compile
code --install-extension .

Other Editors

The GScript Language Server Protocol (LSP) implementation can be used with any LSP-compatible editor:

  • Neovim: Use nvim-lspconfig
  • Emacs: Use lsp-mode
  • Sublime Text: Use LSP package

Updating GScript

From Source

bash
cd gscript-core
git pull
cargo build --release

From Cargo

bash
cargo install gscript --force

Troubleshooting

Build Fails on Windows

If you encounter build errors on Windows:

  1. Ensure you have the latest Visual Studio Build Tools
  2. Install the C++ development workload
  3. Try building with --features vendored-openssl if SSL errors occur

Permission Denied on Linux/macOS

If you get permission errors when installing:

bash
# Option 1: Install to user directory
cargo install --root ~/.local gscript

# Option 2: Use sudo for system-wide install
sudo cargo install --root /usr/local gscript

Cargo Not Found

If cargo command is not found:

  1. Install Rust from https://rustup.rs/
  2. Restart your terminal
  3. Verify with cargo --version

Next Steps

Now that GScript is installed:

Getting Help

If you encounter issues during installation:

Released under the Apache License 2.0