Swift Quick Start
Use the current version table to distinguish
the generator-selected Swift runtime from newer Swift Package Manager tags.
The generated Package.swift is the dependency authority for that workspace.
Before you start
Complete Prepare the Client and Starter Model
first. You need the Cargo-based TeaQL client, your language toolchain, and the
school model saved as models/main.xml. Run the commands below from that
project root. The shared setup explains why cargo teaql is used for every
language.
Generate the library and application
cargo teaql services
cargo teaql evaluate --input models/
cargo teaql swift-lib-core --input models/ --output generated/swift-lib-core
cargo teaql swift-app-console --input models/ --output generated/swift-app-console
Read the generated application AGENTS.md, then build and run the workspace
using its Package.swift. For application API discovery, request the current
model-aware Assist rather than inspecting generated library source:
cargo teaql swift-assist-query/school --input models/
cargo teaql swift-assist-ensure-schema --input models/
At startup, install the generated passive Runtime Module and explicitly call
the context-aware, module-level ensureSchema entry point. The application
must pass the generated module, not module.entities: passing only the entity
array bypasses module-owned constant and root seeding. Current runtime examples
use context.ensureSchema(module). Never call schema reconciliation implicitly
as a side effect of module installation.
After startup, verify the seeded root and constants, create a child through an
audited save, query it with comment and purpose, and repeat schema setup to
test idempotence. Keep the exact executable commands and results with the
application test report. See Swift First Verification.
Learn through an Order
Follow the Order tutorial for the retained SQLite example: startup, complete reads, an audited quantity/total edit, bounded pages and expected results. Use the Order API usage guide for result shapes and the native troubleshooting table for recovery. The coverage matrix keeps remaining writing and clean-machine packaging gaps visible. Existing runtime pending-release and generator-deployment qualifications remain in place.