Skip to main content

Crate toasty_cli

Crate toasty_cli 

Source
Expand description

The standalone toasty command-line tool.

Installed with cargo install toasty-cli and run from any Cargo package that uses Toasty. Schema-bound commands build the package’s bin (or its lib as a cdylib) and run it with TOASTY_DUMP_SCHEMA set, which makes a constructor inside toasty dump the schema and exit. See docs/dev/design/standalone-cli.md.

The library exists for the binary and its tests; its API is not stable.

Structs§

Config
Configuration for Toasty CLI operations.
Features
Cargo’s feature-selection flags, forwarded to the schema build.
MigrationConfig
Configuration for migration operations.
Project
The Cargo package the CLI operates on, plus its Toasty configuration.

Enums§

Flavor
The database flavor a migration targets: selects the capability the schema is lowered with and the SQL dialect it is rendered in.
MigrationPrefixStyle
Controls the prefix format used when naming generated migration files.

Functions§

run
Parses std::env::args and runs the matching subcommand.
run_from
Parses from an explicit argument list and runs the matching subcommand. Useful for testing.