b0, occasionally

The quick hints if you need to use the b0 tool occasionally.

Basic

How do I build ?

b0

What gets build ?

b0 --what

What can I build ?

b0 list

How do I run tests ?

b0 test
b0 test -l      # Also run the long test
b0 test --what  # Show what will run

How do I run build artefacts ?

b0 list       # Spot the unit name u you are interested in
b0 -- u …     # Build u and run with arguments.
b0 -b -- u …  # Back to build only
b0 -- lib     # If lib is a library gets you in a REPL

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 -- u) …
hyperfine "$(b0 --path -- u) …"

How do I open build artefacts in a browser ?

b0 -- .show-url u
b0 -- .show-url --help   # See the different modes of operation

How do I get information about a unit ?

b0 show u

How can I use the build anywhere ?

eval $(b0 lock)
cd /any/where/
b0 -- u …

More on builds

How do I build specific parts ?

b0 list            # Spot units names or packs you are interested in
b0 -u lib -p pack  # Build unit 'lib' and pack 'pack'

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