rules_nim
has not been yet published to BCR. Please add following git_override
to your MODULE.bazel
:
git_override(
module_name = "rules_nim",
remote = "https://github.com/kczulko/rules_nim",
commit = PUT_SPECIFIC_COMMIT_HERE,
)
# Nim toolchain registration - choose one of supported Nim versions.
nim = use_extension("@rules_nim//nim:extensions.bzl", "nim")
nim.toolchain(nim_version = "2.2.0")
use_repo(nim, "nim_toolchains")
register_toolchains("@nim_toolchains//:all")
- nim_module - Creates a module from a set of
*.nim
files. - nim_cc_binary - Creates executable binary from a Nim code.
- nim_cc_library - Creates a
cc_library
target from a Nim code. - nim_cc_test - Creates test executable from a Nim code.
- nimble_lock_update - Updates
nimble.lock
file with anintegrity
values.
- nimble_lock - Gets dependencies from
nimble.lock
(native Bazel repository cache support). - nimble_install - Gets dependencies through running
nimble
executable (no caching).
Check the e2e examples directory:
- nim_cc_binary - Simple example of nim_cc_binary usage.
- nim_cc_library - Simple example of nim_cc_library usage.
- nim_cc_test - Simple example of nim_cc_test usage.
- numericalnim - Shows the usage of
rules_nim
for a numericalnim project. - c_invocation - Shows the backend C invocation in Nim.
- nim_invocation_from_c - Shows the Nim invocation from C.
- nimble - Shows the usage of
rules_nim
for a nimble project.