bop-cli-0.3.0 is not a library.
bop-cli
The bop command-line tool for the Bop programming language.
Then:
| command | what it does |
|---|---|
bop |
open the REPL |
bop run script.bop |
run with the bytecode VM (default, 2–3× the walker) |
bop run script.bop --novm |
run with the tree-walker |
bop compile script.bop |
AOT-compile to a native binary |
bop compile --emit-rs ... |
emit the transpiled Rust source only |
bop --help |
full usage |
bop compile
Transpiles the script via bop-compile, drops the result into a scratch cargo project, builds it, and copies the binary next to the script (or wherever -o points).
# builds ./fib — a standalone native binary
Flags:
-o PATH/--output PATH— where to put the output--emit-rs— emit the transpiled.rsonly, don't invoke cargo--keep— keep the scratch cargo project around (for inspection)
If cargo isn't on the PATH, bop compile prints a pointer to https://rustup.rs and suggests --emit-rs as an escape hatch. bop run never needs a toolchain — it only depends on the CLI itself.
Why the VM by default
Running bop script.bop goes through the bytecode VM because it's 2–3× faster than the tree-walker on realistic workloads with identical semantics. --novm is kept as an escape hatch for debugging, or for targets where binary size matters more than execution speed.
Related crates
bop-lang— the language corebop-vm— the bytecode runtimebop runuses by defaultbop-compile— the AOT transpilerbop compiledrivesbop-sys— the standard hostbopuses (filesystem imports, stdio, env, time)- The Bop stdlib (
use std.math,std.json, …) is bundled insidebop-langbehind thebop-stdfeature — on by default, sobop run/bop compileJust Work.
License
Dual-licensed under MIT or Apache 2.0, at your option.