drago.toml
drago.toml
The current drago implementation reads package metadata, dependencies, features, runtime directories, and workspace membership from drago.toml.
Minimal manifest
[package]name = "demo"version = "0.1.0"entry = "src/main.tg"description = ""license = "MIT"authors = ""
[dependencies][package]
| Field | Type | Default | Description |
|---|---|---|---|
name | string | "app" | package name |
version | string | "0.1.0" | package version |
entry | string | "src/main.tg" | compiler entry file |
description | string | "" | package summary |
license | string | "MIT" | license string |
authors | string | "" | free-form author field |
[package.runtime]
drago reads runtime directories from the nested section package.runtime.
[package.runtime]dirs = ["bin", "runtime", "native"]| Field | Type | Default | Description |
|---|---|---|---|
dirs | array of strings | ["bin", "runtime", "native"] | runtime asset directories for package distribution |
[dependencies]
Dependencies are stored as TOML key-value pairs. The current parser supports plain versions and inline-table forms.
Registry dependency
[dependencies]http = "1.2.0"Path dependency
[dependencies]shared = { version = "0.1.0", path = "../shared" }Git dependency
[dependencies]utils = { git = "https://example.com/utils.git", ref = "main" }Optional dependency and default-features switch
[dependencies]net = { version = "1.0.0", optional = true, default-features = false }Supported inline-table fields in the current parser:
| Field | Meaning |
|---|---|
version | version string |
path | local dependency path |
git | git repository URL |
ref | git reference |
optional | optional dependency toggle |
default-features | whether default feature expansion stays enabled |
[features]
The current implementation parses feature arrays and supports dep:<name> items.
[features]default = ["cli"]cli = []tls = ["dep:net"]full = ["cli", "tls"]Rules implemented today:
- if
--all-featuresis set, all declared features are enabled - otherwise
defaultis enabled unless--no-default-featuresis used dep:nameenables an optional dependency- feature entries can include other feature names
[workspace]
Workspace roots declare member paths:
[workspace]members = ["crates/app", "crates/core"]drago reads these member paths, checks that each one contains a drago.toml, and uses them for workspace build, check, test, tree, why, and outdated.
What is not in the current manifest
The current manifest.tg parser does not implement a [build] section in the live codebase. If you see older design notes mentioning [build], treat them as stale until the parser and command path land in the repository.