Hacker News new | ask | show | jobs
by elteto 988 days ago
In bazel //... is the equivalent of the 'all' target in make:

    bazel build //...
    bazel test //...
    bazel query //...
The last one should list all targets (from what I remember).
1 comments

Thanks! That last one lists 84 results. None looks obviously like 'main'. Trying a random one:

    bazel run //in_memory/clustering:graph
    ERROR: Cannot run target //in_memory/clustering:graph
I'm going to wait until someone updates the readme I think!
considering the repo doesn't contain a cc_binary build rule, I'm inclined to believe there's no demo, the easiest way to get started (if you want to play around from scratch) would be to add a cc_binary, point that to a main.cpp file which depends on the library targets you want, e.g "//in_memory/clustering:graph" and ensure there's sufficient visibility from the targets.
`bazel run` is for a rule that has been marked `executable = True` and there is no such rule in the repository.

If you `bazel build //...`, you should get the compiled libs under `bazel-out/*fastbuild/bin/`.

Then most likely this is meant to be used primarily as a library. You should wait until they open source the tests (soon, per another commenter). Those will be runnable targets.