Skip to content

vspcoderz/revitscript

Repository files navigation

RivetScript v0.1

RivetScript is a backend/system-oriented language with JS-adjacent syntax and safer defaults ("rivet" mode). This repo hosts the Rust stage-0 compiler (rsc), runtime VM, and the forger project runner.

Quick start

cargo run -- run examples/hello.rvt
cargo run -p forger -- run

Install

git clone https://github.com/vspcoderz/revitscript.git
cd rivetscript/rivet
cargo build --release -p compiler -p forger
export PATH="$PWD/target/release:$PATH"

Release binaries live in dist/ after running the scripts below. Attach them to your GitHub release for distribution.

Release builds

./scripts/build-release.sh

Windows PowerShell:

./scripts/build-release.ps1

Docs & learning

  • docs.md (learning-focused guide: architecture, bytecode, runtime, CLI)
  • learn.md (syntax primer for developers)
  • version.json controls automatic release tagging (+ release notes) when pushed to main

Install helpers

  • Bash: ./scripts/install.sh [dest] downloads the latest Linux/macOS tarball, extracts rsc/forger, and installs them into /usr/local/bin or the dest you pass.
  • PowerShell: ./scripts/install.ps1 [-InstallDir <path>] grabs the Windows ZIP release, extracts rsc.exe/forger.exe, and copies them into something like C:\Program Files\RivetScript (use -InstallDir for a custom folder).

Script shortcuts

The manifest packs.json exposes named scripts—"run": "index.rvt" and "start": "index.rvt"—so forger run start is the same as forger run index.rvt and can power npm start–style launchers. Define more entries like "dev": "examples/service_router.rvt" whenever you need shorthand commands.

Build release artifacts

./scripts/build-release.sh

Windows:

./scripts/build-release.ps1

Commands

  • rsc run <file>: compile and run .rvt or run .rsbc.
  • rsc build <file> -o <out.rsbc>: emit bytecode.
  • rsc test: run tests.
  • forger run [script|file]: run from packs.json or index.rvt.
  • forger build [file] -o <out.rsbc>: build from script or path.
  • forger test: run scripts.test or rsc test.
  • forger init: create packs.json and index.rvt.
  • forger add <name@version>: add a dependency entry.

About

RivetScript is a backend/system-oriented language with JS-adjacent syntax and safer defaults

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors