# Apply this patch in your project if you want to use shared libraries with mojo
single_version_override(
module_name = "rules_cc",
patch_strip = 1,
patches = [
# https://github.com/bazelbuild/rules_cc/pull/578
"//tools:rules_cc.patch",
],
)
This repository provides rules for building Mojo projects using Bazel.
Copy the latest MODULE.bazel snippet from the releases
page.
Currently rules_mojo requires bzlmod and bazel 8.x or later.
load("@rules_mojo//mojo:mojo_binary.bzl", "mojo_binary")
mojo_binary(
name = "hello_mojo",
srcs = ["hello_mojo.mojo"],
)
See the tests directory for more examples.