Skip to content

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]

FieldTypeDefaultDescription
namestring"app"package name
versionstring"0.1.0"package version
entrystring"src/main.tg"compiler entry file
descriptionstring""package summary
licensestring"MIT"license string
authorsstring""free-form author field

[package.runtime]

drago reads runtime directories from the nested section package.runtime.

[package.runtime]
dirs = ["bin", "runtime", "native"]
FieldTypeDefaultDescription
dirsarray 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:

FieldMeaning
versionversion string
pathlocal dependency path
gitgit repository URL
refgit reference
optionaloptional dependency toggle
default-featureswhether 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-features is set, all declared features are enabled
  • otherwise default is enabled unless --no-default-features is used
  • dep:name enables 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.