Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Manifest Reference

Tong reads Tong.toml and a small compatible subset of Cargo.toml.

Package

[package]
name = "hello-tong"
version = "0.1.0"
edition = "2024"

Targets

[lib]
name = "hello_tong"
path = "src/lib.rs"

[[bin]]
name = "hello-tong"
path = "src/main.rs"

Proc macro libraries are supported with:

[lib]
proc-macro = true

Dependencies

Path dependencies:

[dependencies]
greet = { path = "greet" }

Fixed source dependencies:

[dependencies]
from_git = { git = "https://example.com/repo.git", rev = "abc123" }
from_tar = { tar = "https://example.com/pkg.tar.gz", sha256 = "..." }
from_zip = { zip = "https://example.com/pkg.zip", sha256 = "..." }

Registry-style transitive dependencies need explicit source overrides:

[tong.sources.clap]
tar = "https://static.crates.io/crates/clap/clap-4.5.54.crate"
sha256 = "..."

Tong Extension

A Tong.toml file can extend another manifest:

[tong]
extends = "Cargo.toml"