Drago is the package manager and daily build tool for Thagore.
It is implemented in pure .tg and compiled by thagc.
thagc(v0.9+)curltarsha256sum- Windows now supported natively via PowerShell (no Git Bash required); POSIX tools still used on Linux/macOS.
cd /media/lehungquangminh/QM_SSD/drago
THAGC=/media/lehungquangminh/QM_SSD/thagore/build-llvm21/compiler/thagc
$THAGC build src/main.tg -o drago.bindrago new <name>drago builddrago rundrago testdrago add <package> [version]drago add --git <url> [ref] [--ref <name>] [--alias <name>]drago add --path <dir> [version] [--alias <name>]drago remove <package>drago installdrago install <package> [version]drago install --git <url> [ref] [--ref <name>] [--alias <name>]drago install --path <dir> [version] [--alias <name>]drago update [dependency|drago|thagc|toolchain|all]drago publishdrago fmtdrago checkdrago cache list|size|clean|purge|purge-unuseddrago auditdrago treedrago why <package>drago outdateddrago runtime-path <package> [asset-dir]- Global build flags:
--locked--frozen--offline-p, --package <name>--features <f1,f2>--all-features--no-default-features
--features / --all-features / --no-default-features are supported in build, run, check, test, install, update, tree, why, and outdated.
--package selects one workspace member by package name or member path.
drago install installs all dependencies declared in drago.toml.
drago install <package> [version] is an npm-style alias of drago add <package> [version] (add + install one dependency).
drago add --git ... / drago install --git ... clone a git source into the local cache and record it in drago.toml.
Git dependencies are now written as { git = "...", ref = "..." }; --ref is equivalent to the positional [ref].
drago add --path ... / drago install --path ... copy a local source tree into the local cache and record it in drago.toml.
External sources infer the dependency name from the repo/path leaf when possible; use --alias <name> to override it.
If an external package ships bin/, runtime/, or native/, drago mirrors those directories into ~/.thagore/runtimes/<name>/<version>/ so runtime assets have a stable location outside the source cache.
Packages can override the mirrored directories with:
[package.runtime]
dirs = "bin, runtime, native, support"Only relative directories inside the package root are accepted; absolute paths and .. segments are ignored.
Use drago runtime-path <package> to print the runtime root, or drago runtime-path <package> <asset-dir> to print one specific mirrored directory.
External source names are rejected if they conflict with a registry package, to avoid ambiguous imports.
drago update <dependency> updates one dependency (instead of all selected dependencies).
drago update drago (or drago update toolchain / drago update all) runs thagup in default mode and updates both drago and thagc.
drago update thagc runs thagup --without-drago and updates thagc only.
Self-update uses thagup.sh on POSIX and thagup.ps1 on Windows.
--locked blocks commands that would modify drago.lock and fails if lockfile is out of sync for build/read commands.
--frozen implies lockfile immutability and requires offline mode (--offline or DRAGO_OFFLINE=1) for networked commands.
--offline disables network fetches for registry/package resolution and relies on local cache/file-based registry.
External source installs are treated as unreviewed code. Drago prints a risk warning and requires either:
--yesDRAGO_ACCEPT_RISK=1
Drago supports workspace roots with [workspace].members.
[workspace]
members = ["crates/a", "crates/b"]drago build/drago check/drago testat workspace root run for all members.drago runat workspace root requires exactly one member (otherwise it is ambiguous).- Use
--package <name>to target one member foradd/remove/build/run/test/check/install/update/tree/why/outdated. - Mutating dependency commands (
add/remove/install/update) at workspace root auto-sync a merged rootdrago.lock. - In workspace roots,
--lockedvalidates against the merged rootdrago.lock(all members), even when--packageis used. whynow reports transitive dependency chains when package sources are available in local cache.
Drago supports optional dependencies with feature activation:
[dependencies]
core = "1.0.0"
optdep = { version = "2.0.0", optional = true, default-features = false }
[features]
default = ["dep:optdep"]
extra = ["dep:optdep"]- Optional dependencies are included when enabled by features (
dep:<name>or<name>item). --all-featuresenables all feature-defined optional dependencies.--no-default-featuresdisables thedefaultfeature set.
Default registry source:
https://raw.githubusercontent.com/thagore-foundation/registry/main
Override registry base for local testing:
export DRAGO_REGISTRY_BASE="file:///media/lehungquangminh/QM_SSD/drago/registry"THAGC: path to compiler binary (thagc)DRAGO_TARGET: optional target triple for cross compileDRAGO_COLOR:auto(default),always,neverDRAGO_BUILD_FLAGS: build flags fingerprint for cache metadataDRAGO_OFFLINE=1: block network download and use local cache onlyDRAGO_REGISTRY_BASE: registry base URL overrideDRAGO_ACCEPT_RISK=1: accept git/path dependency risk prompts for non-interactive installsGITHUB_TOKEN: required fordrago publishDRAGO_UPDATE_DRY_RUN=1: pass--dry-runtothagupfor self-update previewDRAGO_THAGC_TAG: pass--tag <value>tothagupDRAGO_DRAGO_TAG: pass--drago-tag <value>tothagupDRAGO_CHANNEL: pass--channel <value>tothagupDRAGO_ARCH: pass--arch <value>tothagup
- No C/C++ sources in this repository.
- Runtime, filesystem, process, TOML, HTTP operations are through Thagore stdlib wrappers.
Drago CI(.github/workflows/ci.yml)- Trigger:
pushtomain, all pull requests. - Matrix: Linux (
x86_64,aarch64), macOS (x86_64,aarch64), Windows (x86_64,aarch64) with parity to Thagore release lanes. - Steps: provision LLVM 21, install
thagcfrom release tag (v1.0.0), builddrago, rundrago checkanddrago test, upload platform artifacts.
- Trigger:
Drago Release(.github/workflows/release.yml)- Trigger: tags
v*(and manual dispatch). - Build matrix: Linux x86_64/aarch64, macOS x86_64/aarch64, Windows x86_64/aarch64.
- Non-blocking lanes: macOS x86_64/aarch64 and Windows x86_64.
- Publish platform bundles + per-platform SHA256 manifests to GitHub Releases.
- Trigger: tags