Lines Matching +full:bazel +full:- +full:5
1 ---
3 title: Integrating a Bazel project
6 nav_order: 5
7 permalink: /getting-started/new-project-guide/bazel/
8 ---
10 # Integrating a Bazel project
13 - TOC
15 ---
17 ## Bazel projects
19 The process of integrating a project using the [Bazel](https://bazel.build/)
20 build system with OSS-Fuzz is very similar to the general
21 [Setting up a new project]({{ site.baseurl }}/getting-started/new-project-guide/)
22 process. The key specifics of integrating a Bazel project are outlined below.
24 ## Fuzzing support in Bazel
26 For Bazel-based projects, we recommend using the
30 [multiple sanitizer and fuzzing engine configurations][rules-fuzzing-usage].
34 The fuzzing rules provide out-of-the-box support for building and packaging fuzz
35 test artifacts in the OSS-Fuzz format. Each `//path/to:fuzz_test` fuzz test
38 in the OSS-Fuzz environment variables, and (b) generates an archive containing
40 OSS-Fuzz provides a standard tool to automatically process these targets,
43 [rules-fuzzing-usage]: https://github.com/bazelbuild/rules_fuzzing#using-the-rules-in-your-project
48 `rules_fuzzing` library with OSS-Fuzz. You can also see a complete example in the
49 [`bazel-rules-fuzzing-test`](https://github.com/google/oss-fuzz/tree/master/projects/bazel-rules-fu…
52 The structure of the project directory in the OSS-Fuzz repository does not
53 differ for Bazel-based projects. The project files have the following specific
60 Since the OSS-Fuzz target builds the fuzz test using the instrumentation and
61 engine specified in the OSS-Fuzz environment variables, all the engine and
67 There is no need to install Bazel in your Docker image. The OSS-Fuzz builder
68 image provides the `bazel` executable through the
70 and use the latest Bazel release. If your project requires a particular Bazel
72 [`.bazelversion`](https://docs.bazel.build/versions/master/updating-bazel.html)
78 which fuzz tests to build, (2) building their OSS-Fuzz package targets in the
82 OSS-Fuzz provides a
83 [`bazel_build_fuzz_tests`](https://github.com/google/oss-fuzz/blob/master/infra/base-images/base-bu…
90 * `BAZEL_EXTRA_BUILD_FLAGS` are extra build flags passed on the Bazel command
95 `"no-oss-fuzz"`.
96 * `BAZEL_FUZZ_TEST_QUERY` overrides the Bazel query the tool uses to identify
97 the fuzz tests to build, if the tag-based approach is not sufficient.