Skip to content

Install

Install

Thagore ships two installation paths:

  1. prebuilt release archives installed with thagup.sh or thagup.ps1
  2. source builds from this repository with Cargo

What you will install

The toolchain currently provides these command-line tools:

ToolRoleSource
thagcCompiler drivertools/thagore-cli
thagoreAlias of thagctools/thagore-cli
thagore-fmtOfficial formattertools/thagore-fmt
thagore-lspLanguage Server Protocol servertools/thagore-lsp
dragoPackage manager, version-checked against thagcseparate repo

Prebuilt installers

Release installers live in this repository:

ScriptPlatform
tooling/release/thagup.shLinux, macOS, BSD, other POSIX shells
tooling/release/thagup.ps1Windows PowerShell

The installer resolves the correct archive from the release manifest, verifies SHA256, then installs:

  • binaries into PREFIX/bin
  • the standard library into PREFIX/share/thagore/stdlib

Install the current in-develop toolchain

Terminal window
curl -fsSL https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.sh | sh

Install to a custom prefix

Terminal window
curl -fsSL https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.sh | sh -s -- --prefix "$HOME/.local/share/thagore"

Install a specific target or channel

Terminal window
curl -fsSL https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.sh | sh -s -- \
--channel extended \
--target x86_64-unknown-linux-musl

Windows PowerShell

Terminal window
irm https://github.com/thagore-foundation/thagore/releases/latest/download/thagup.ps1 | iex

Release channels

ChannelMeaning
indevCurrent public in-develop toolchain builds
extendedAdditional semver release artifacts when a builder is available
nightlyPreview prerelease artifacts

The canonical target matrix is exposed by:

Terminal window
thagc --print-target-list

Current in-develop targets:

  • x86_64-unknown-linux-gnu
  • aarch64-unknown-linux-gnu
  • x86_64-unknown-linux-musl
  • aarch64-unknown-linux-musl
  • x86_64-apple-darwin
  • aarch64-apple-darwin
  • x86_64-pc-windows-msvc
  • aarch64-pc-windows-msvc

Prerequisites

You need:

RequirementNotes
Current Rust toolchainBuild system for thagc, thagore-fmt, and thagore-lsp
CargoComes with Rust
C toolchainRequired for runtime compilation and final linking
LLVM 14 development filesThe current backend builds against inkwell with LLVM 14
cc linkerUsed by the codegen output path
python3Useful for local docs and static site tooling

On Debian or Ubuntu, a working baseline is:

Terminal window
sudo apt update
sudo apt install -y build-essential clang llvm-14 llvm-14-dev llvm-14-tools lld pkg-config python3 curl git
curl https://sh.rustup.rs -sSf | sh

If your LLVM 14 binaries are installed under a non-default prefix, export LLVM_SYS_140_PREFIX before building:

Terminal window
export LLVM_SYS_140_PREFIX=/usr/lib/llvm-14

Build from source

Clone the compiler repository and build the active tools:

Terminal window
git clone https://github.com/thagore-foundation/thagore.git
cd thagore
cargo build -p thagore-cli -p thagore-fmt -p thagore-lsp

This produces:

BinaryPath
thagctarget/debug/thagc
thagoretarget/debug/thagore
thagore-fmttarget/debug/thagore-fmt
thagore-lsptarget/debug/thagore-lsp

Verify the compiler

Check the compiler version:

Terminal window
./target/debug/thagc version

At the time of writing, the repository reports:

thagc 0.9.6
llvm: 14.0.0
host: x86_64-linux-gnu

Create a minimal program:

func main():
println("Hello, Thagore!")

Save it as hello.tg, then compile and run it:

Terminal window
./target/debug/thagc build hello.tg -o hello
./hello

You can also typecheck without code generation:

Terminal window
./target/debug/thagc check hello.tg

Verify the formatter

The formatter is a separate binary:

Terminal window
./target/debug/thagore-fmt --help

Format a file in place:

Terminal window
./target/debug/thagore-fmt hello.tg

Check formatting without rewriting:

Terminal window
./target/debug/thagore-fmt --check hello.tg

Verify the language server

Build output already includes the LSP server:

Terminal window
./target/debug/thagore-lsp --help

Editor integrations should launch thagore-lsp over stdio. The repository also contains a VS Code extension scaffold under editors/vscode/.

Optional: install source-built binaries into your PATH

If you want the tools available globally from your shell:

Terminal window
mkdir -p "$HOME/.local/bin"
cp target/debug/thagc "$HOME/.local/bin/"
cp target/debug/thagore "$HOME/.local/bin/"
cp target/debug/thagore-fmt "$HOME/.local/bin/"
cp target/debug/thagore-lsp "$HOME/.local/bin/"
export PATH="$HOME/.local/bin:$PATH"

Add the PATH export to your shell profile if you want it to persist.

Build drago from source

drago lives in a separate repository and is compiled by thagc.

Clone drago next to thagore or anywhere you prefer:

Terminal window
git clone https://github.com/thagore-foundation/drago.git
cd drago

Point drago at the compiler you just built:

Terminal window
THAGC=/absolute/path/to/thagore/target/debug/thagc
$THAGC build src/main.tg -o drago.bin
./drago.bin version

The current drago codebase expects thagc >= 0.9.6.

Common build issues

LLVM not found

If Cargo fails while compiling the backend or llvm-sys, your LLVM 14 development files are missing or not discoverable. Install LLVM 14 and set LLVM_SYS_140_PREFIX to the correct directory.

Linker errors

thagc uses a C runtime object during final linking. Make sure a working C toolchain is installed and that cc is available in PATH.

Installer cannot find the requested target

Pass --target <triple> explicitly. The installer defaults to the host target, and only installs artifacts present in the release manifest.

drago cannot find thagc

drago resolves the compiler from:

  1. THAGC
  2. common local build paths
  3. PATH

If in doubt, set THAGC explicitly to the thagc binary you want it to use.

Next steps

  • Read Language Overview for the core language model.
  • Read Imports before building multi-file projects.
  • Read Drago if you want package management and project workflows.