Synopsis
Behavior
- Discover the project and select the target: the one named, the project’s only actor, or every target when several exist and none is named.
- For a target that uses off-chain functions, build the off-chain image first and write its proxy; the actor compiles against the generated proxy, and the proxy pins the image digest, so a stale proxy cannot survive this command.
- Compile the actor artifact and apply the same source rules as
cowboy check. - Write the artifact and its manifest to
.cowboy/build/<target>and printBuilt actor target '<name>'.with the artifact path, code hash, and build identity. Off-chain targets also print the image digest, the written and unchanged files, and the exported function signatures.
--json the result flattens the cowboy check result and adds output_directory, files, and, for off-chain targets, an offchain object (image lock, packages, exports, written/unchanged paths, credential-like paths that were excluded, source file counts, and, with --list-files, every path that will be published).
Flags
Example
Edge Cases
- The off-chain flags (
--base-rootfs,--expected-base-digest,--list-files) are refused when the selected target does not use off-chain functions. - Files whose names look like credentials are excluded from the image and listed as
excluded (credential-like): <path>. - Rule violations fail the build with exit code 1 and every broken rule reported.