Skip to content

kczulko/rules_nim

Repository files navigation

Nim rules for Bazel

CI linux_amd64 osx_amd64

Installation

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")

Public API

Rules

Repository rules

  • nimble_lock - Gets dependencies from nimble.lock (native Bazel repository cache support).
  • nimble_install - Gets dependencies through running nimble executable (no caching).

Usage examples

Check the e2e examples directory: