Root-Level Constructs

The project root is an implicit space. It accepts the same members as an explicit space, including imports, declare forms, functions, classes, values, types, starters, and child spaces.

Imports

Canonical module imports have this shape:

import ModuleName [as LocalName] [features Feature...] [version Semver]

The quoted Cargo-name escape hatch requires an alias:

import "cargo-name" as LocalName [features Feature...] [version Semver]

Typical file inclusion has these shapes:

import "Relative.ty" [as SpaceName]
import "GlobSelectingTyFiles"

Inherited wrapper policy has this shape and creates no binding:

declare import ModuleName [features Feature...] [version Semver]

Imports and declare import forms precede all other semantic root members. Comments and intents may precede or occur between them.