Skip to main content

Module compile_cmd

Module compile_cmd 

Source
Expand description

The compile command body, run by bynk compile (D2/E1, #2998): before this, only bynk had it, so bynk compile had to start a bynk process. Parameterised by the program name that prefixes messages, like crate::run_check and crate::run_fmt.

Structs§

BuildArgs
What a build run was asked to do: the flags given, over [build].
CompileArgs
What a compile run was asked to do.

Enums§

CliPlatform
v0.17: the deploy platform that selects the bynk surface binding. Distinct from CliTarget (the emit topology). v0.18 adds node.
CliProfile
--profile: a named build profile (#3054). It chooses the defaults a [profile.<name>] table can override; today that is contracts only.
CliTarget
--target: the build topology.
EmitFormat
v0.108 (in-browser track, slice 1): the emitted artefact language. ts (the default and primary output) writes the typed TypeScript modules; js writes the same modules with their types stripped — an emit-then-strip JavaScript artefact (ADR 0137) runnable with no tsc in the loop. Orthogonal to --target (topology) and --platform (binding).

Functions§

profile_contracts
#3107: whether a build under profile carries the contract guard, the one rule every verb that builds shares: [profile.<name>] contracts, else the profile’s default (dev on, release off). bynk build also takes a profile from its flag; test is always dev, deploy always release.
project_contracts
profile_contracts for the project at root, reading its bynk.toml.
refuse_release_contracts
#3107: deploy always builds release, and a deployment never carries contract checks (DECISION J of v0.115), so [profile.release] contracts = true is refused for it, naming the table.
refuse_undeployable_project
What a deployment refuses before it prepares anything: contract checks in the release profile (refuse_release_contracts). A [deploy.workers] group is not one.
run_build
Run build (#3054): resolve each setting as flag, else [build], else the built-in default, then run run_compile. compile itself never reads [build].
run_compile
Run compile. prog prefixes the messages ("bynk").