Repository navigation
Toolchain
Torvik comes with two main command-line tools:
-
torvc— the compiler (turns.tvfiles into native executables) -
rune— the project and build tool (recommended for most development)
Both tools are themselves written in Torvik (self-hosting), and behave identically on Linux and Windows.
Use torvc to compile individual files:
torvc hello.tv -o hello # Compile to executable "hello"
./helloOn Windows, output is a .exe:
torvc hello.tv -o hello.exe
.\hello.exe| Flag | Purpose |
|---|---|
-o <name> |
Set the output executable name |
--final |
Production build (optimized + stripped) |
-
--no-warn— suppress compile warnings (never fatal;-qimplies it;!@NO_WARN;at the top of a file does the same per-file) |-q/--quiet| Suppress the success message | |-v/--verbose| More detailed output | |--version| Show the Torvik version |
Important
You need clang on your PATH. On Windows it must be a clang that bundles the MinGW-w64 headers/libraries (LLVM-MinGW, MSYS2, or WinLibs) — plain LLVM alone lacks the C headers. torvc checks for this and gives an actionable message if it's missing.
rune is the best way to work on real projects. It handles project creation, building, running, and keeping Torvik up to date.
Since v1.5.0,
torvc file.tvruns a file directly (compile, execute, no binary left behind), and any arguments after it reach the program viaargs_get.rune run file.tv [args...]does the same. For systems work,torvc --bareproduces a freestanding image — see Forge your first kernel.
Since v1.5.0,
rune updatekeeps you on your current major and reports a new one rather than installing it (rune update v2 --yesopts in;--silence-majorquiets the notice). The standard library has its own repository and version line, gated the same way withrune update --std-major.
Since v1.4.0,
runelives in its own repository (torvik-lang/rune) and versions independently. It still installs alongsidetorvcand manages Torvik exactly as before;rune versionreports its version and the language/std versions.
rune new myapp # Creates a new project directory
cd myapp
rune run # Build + run (or use `rune build` to just build)A new project has this structure:
-
torvik.rune— the project manifest -
src/main.tv— the entry point (df main())
The manifest can declare a minimum Torvik version; rune build/run will refuse to build with an older toolchain and point you at rune update:
name = "myapp"
torvik = "1.1.0"
| Command | Description |
|---|---|
rune new <name> |
Create a new project |
rune init |
Initialize a project in the current directory |
rune run |
Incrementally build and run |
rune build |
Build the project |
rune build --final |
Production build (optimized + stripped) |
rune clean |
Remove build artifacts |
rune list |
Show project information |
rune update |
Update the Torvik toolchain (see below) |
rune self-update |
Update just rune itself, from its own repo |
rune version |
Show versions |
rune uninstall |
Remove Torvik completely |
rune help |
Display all commands / the help section |
Note
rune run is incremental — subsequent runs are very fast if nothing changed.
rune update # update to the latest release
rune update v1.1.1 # pin an exact release
rune update v1.1 # newest 1.1.x
rune update v1 # newest 1.x
rune self-update # update just rune, not the toolchainA bare rune update first checks whether you're already on the latest release. If the latest is a new major version, it warns about possible breaking changes and asks you to confirm. --yes skips the prompt; --force reinstalls even if you're already current. A pinned version that doesn't exist fails cleanly without touching your current install.
Since v1.4.0, rune and Torvik live in separate repositories, so rune update checks each independently and updates whichever has moved. Use rune self-update to update only rune.
rune uninstall removes Torvik completely — it takes the Torvik entry back out of your shell startup files and deregisters the .tv file type and icons. Startup files that never had a Torvik entry are left untouched.
Use --final for release binaries:
rune build --final
# or
torvc main.tv -o myapp --finalThis enables maximum optimization and strips debug symbols.
- Explore built-in functions in the Standard Library
- See the full tooling details in the repo: docs/TOOLING.md