package b0
Software construction and deployment kit
Install
dune-project
Dependency
Authors
Maintainers
Sources
b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/occasionally.html
b0
, occasionally
The quick hints if you need to use the b0
tool occasionally.
In b0
the build is organized into named units. Lists of units can be gathered into named packs. A unit can be in more than one pack. In general the repeatable options -u
and -p
allow to select units and packs and -x
and -X
to substract from this selection.
Basic
How do I build ?
b0
What gets build ?
b0 --what
What can I build ?
b0 list
How do I run tests ?
b0 list --tests # List tests
b0 test # Run all tests
b0 test -l # Run all tests, including the long ones
b0 test --what # Report what would build and run
b0 test -u this -u that # Only run the 'this' and 'that' tests
b0 test --seed 123 # Run random tests with seed 123
b0 test --correct # Correct failed snapshot tests
Since tests are executable you can also run them directly. See How do I run build artefacts ?. In particular certain tests may offer specific options, consult them by invoking the test directly.
b0 -- this_test --help
How do I run build artefacts ?
b0 list # Spot the name of the unit you are interested in
b0 -- mytool … # Build mytool and run with arguments.
b0 -- mylib # If mylib is a library gets you in a REPL
b0 -- mymedia # May be configured to render the media
b0 -b -- mytool … # Back to build only
How do I benchmark an executable ?
The following forms can be used in order to have up-to-date artefacts but avoiding timing the build.
time $(b0 --path -- mytool) …
hyperfine "$(b0 --path -- mytool) …"
How do I open build artefacts in a browser ?
b0 -- .show-url mywebsite
b0 -- .show-url --help # See the different modes of operation
b0 -- mywebsite # May be configured to open in your browser
How do I get information about a unit or pack ?
b0 info mytool
b0 info mypack
How can I use the build anywhere ?
eval $(b0 lock)
cd /any/where/
b0 -- mytool …
How can I add a new source to the project ?
b0 init src > module.ml # Default has OCaml syntax
b0 init src unit.h unit.c # Uses extensions for syntax
b0 init src -x > example.ml # Uses CC0-1.0 license
b0 init src --help
More on builds
How do I build specific parts ?
b0 list # Spot units names or packs you are interested in
b0 -u mylib -p mypack # Build unit mylib and units in mypack
b0 -p mypack -x mytool # Build units in mypack without mytool (if applicable)
How do I clear the build ?
b0 delete
b0 delete -a # Clean
How do I see build steps ?
b0 log
b0 log -l
Which build steps take time ?
b0 log -d
Which build steps failed ?
b0 log -e
Which build steps did really execute ?
b0 log -u
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
-
Basic
- How do I build ?
- What gets build ?
- What can I build ?
- How do I run tests ?
- How do I run build artefacts ?
- How do I benchmark an executable ?
- How do I open build artefacts in a browser ?
- How do I get information about a unit or pack ?
- How can I use the build anywhere ?
- How can I add a new source to the project ?
- More on builds