Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Spec ¶
type Spec struct {
SrcDir string // directory name relative to monorepo root, e.g. "rollup-boost"
Package string // cargo package name, e.g. "rollup-boost"
Binary string // binary name, e.g. "rollup-boost"
}
Spec describes a Rust binary to be built and located.
func (Spec) EnsureExists ¶
EnsureExists locates or builds a Rust binary as needed.
Env var overrides (suffix derived from binary name, e.g. "rollup-boost" -> "ROLLUP_BOOST"):
- RUST_BINARY_PATH_<BINARY>: absolute path to pre-built binary (skips build, must exist)
- RUST_SRC_DIR_<BINARY>: overrides SrcDir (absolute path to cargo project root)
Build behavior:
- RUST_JIT_BUILD=1: runs cargo build in debug mode (letting cargo handle rebuild detection)
- Otherwise: only checks binary exists, errors if missing
Click to show internal directories.
Click to hide internal directories.