Package root and entry
링크A package root contains topaz.. Package-mode commands load that file from the selected root, which defaults to the current directory. The manifest is read before the package entry source.
Package loading source
[package] declares the package name, version, language mode, and entry path. The entry is relative to the package root. License metadata is optional. Unknown top-level sections and unknown fields in supported sections are rejected.
Manifest sections source · Package fields source
topaz init - creates a native package with a complete entry program. It refuses to overwrite an existing manifest or entry. Use that scaffold as the starting point for the configuration below.
Scaffold source
Configuration example
링크Complete native package configuration
링크[package]name = "reference_app"version = "0.1.0"language = "5.21"entry = "src/main.tpz"[build]target = "native"deterministic = true[dependencies]std = { version = "5.21" }
import std.ioexport function main(args: Array<string>, stdin: string) -> Result<int, string> {io.writeLine("Hello from Topaz")Ok(0)}
기대 결과
기대 결과
Configuration example. The command references own executable check, initialization, and lock examples.
Place both files under the same package root. Run package-mode commands from that root, or select it with --root.
Dependency identity
링크Each dependency declaration uses a table. A version dependency has version and may have hash. A path dependency has path and requires hash. The table chooses exactly one of version and path. A bare version string is rejected when the package manifest is loaded.
Dependency declaration source
Registry dependency compilation requires - and matching content under vendor/. The dependency package name and version must agree with the declaration. A local dependency's manifest name must also agree with its declared name.
Package dependency loading source
[exports]. selects the module a dependency exposes as its root. Without that section, its package entry supplies the root. A dependency name that collides with a root module path is rejected. These configuration relationships do not redefine source import syntax.
What topaz.lock binds
링크topaz. records the root package identity and a manifest_ derived from the manifest text. It also binds declared dependency identities and content hashes. Changing a locked input requires a corresponding lock update.
Lock verification source · Manifest digest source
- verifies the existing lock before the applicable package operation continues. Missing, stale, duplicate, or undeclared lock entries are rejected. topaz lock writes the lock for the current manifest. It does not waive a mismatched local dependency hash.
Lock verification also checks declared extern artifacts and replay inputs, plus embedded Lispex source, limits, quotas, and prepared artifacts when present. A matching root manifest hash does not replace those checks.
Select the build artifact
링크[build]. selects native, web, or web-. An omitted build target selects native. Ordinary package loading requires deterministic builds. The separate usage-profile validation path does not enable an unrestricted nondeterministic build.
Build configuration source
For package builds, an explicit command target takes precedence over the manifest target. Without a command target, build uses the manifest. Entry-file builds use their command target or the native default. Web targets cannot be combined with automatic execution through -.
Package build selection source
The target describes the resulting artifact. It does not select SELF or the reference compiler. emit has a separate Rust-source target and does not produce a final native or web binary.
Embedded Lispex configuration
링크[lispex] selects a package-owned evaluator profile and declares at least one [[lispex.. Each rule has a unique name and distinct project-relative source and limits paths. A package containing this section requires locked compilation.
Lispex configuration source · Locked package requirement
An application identifier and its application_ file appear together. The application and evaluator profile must be a supported pair. In the current language mode, application configuration also requires the exact standard-library version for that mode.
Application binding source
The Lispex admission contract defines package admission and component identities. The factory contract defines generated calls from the verified lock. Installed profile availability requires distribution evidence.
Lispex lock verification follows the package admission and generated factory contracts. Changing a locked input requires a matching lock update.
Additional package inputs
링크[capabilities. declares project-relative read and write roots. [extern] declares externally implemented modules and their associated inputs. An extern module cannot occupy a root path already used by a local module or dependency.
Capability and export declarations · Extern module collision source
The complete external ABI and host sandbox behavior belong to their own reference contracts. This page records their effect on package identity and lock verification.
Pending contracts
링크One registry materialization command
링크One registry materialization command
Use topaz vendor - for registry dependency materialization. topaz fetch is rejected during command validation.
The vendor command without - checks existing vendored content and updates the lock. Supplying - also copies the selected registry content.
이유
Both reviewed command names materialize the same dependencies in the vendor directory and write the same lock. They express the same dependency materialization intent. The vendor name identifies the destination.
One registry materialization command rejection
- 계열
- topaz-cli
- 단계
- command
- 연산
- argument-validation
- 분류
- registry-command
원인과 조건
Use topaz vendor - for registry dependency materialization. topaz fetch is rejected during command validation.
대응
Use topaz vendor - to materialize registry dependencies.
One registry materialization command examples
링크Reject the fetch command alias
링크let value = 1
표준 출력 없음.[package]name = "tools_registry_example"version = "0.1.0"language = "5.21"entry = "main.tpz"[build]target = "native"deterministic = true[dependencies]sample = { version = "1.0.0" }
[package]name = "sample"version = "1.0.0"language = "5.21"entry = "main.tpz"
export let value = 1
기대 결과
Materialize a registry dependency with vendor
링크let value = 1
표준 출력 없음.[package]name = "tools_registry_example"version = "0.1.0"language = "5.21"entry = "main.tpz"[build]target = "native"deterministic = true[dependencies]sample = { version = "1.0.0" }
[package]name = "sample"version = "1.0.0"language = "5.21"entry = "main.tpz"
export let value = 1
기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.
Dependency declarations use tables
링크Dependency declarations use tables
Each entry in [dependencies] is a table. A bare version string is rejected while the package manifest is loaded.
A version dependency uses version and may include hash. A path dependency uses path and requires hash. Each table chooses exactly one of version and path.
이유
A version string and a table containing that version select the same dependency. The table preserves this intent and carries version, path, and content hash fields through one declaration structure.
Dependency declarations use tables rejection
- 계열
- topaz-cli
- 단계
- package
- 연산
- manifest-admission
- 분류
- dependency-table
원인과 조건
Each entry in [dependencies] is a table. A bare version string is rejected while the package manifest is loaded.
대응
Use a table such as std = { version = "5. in [dependencies].
Dependency declarations use tables examples
링크Reject a version string dependency
링크[package]name = "tools_dependency_table"version = "0.1.0"language = "5.21"entry = "main.tpz"[dependencies]std = "5.21"
let value = 1
표준 출력 없음.기대 결과
기대 결과
거절 단계 package. 종료 코드 1.
Dependency declarations use tables rejection→tools-dependency-table-required
Lock a table dependency
링크[package]name = "tools_dependency_table"version = "0.1.0"language = "5.21"entry = "main.tpz"[dependencies]std = { version = "5.21" }
let value = 1
표준 출력 없음.기대 결과
기대 결과
검사가 프로그램을 받아들입니다. 종료 코드 0.