Skip to content

Unofficial port of Sqids for Bazel. Generate short YouTube-looking IDs from numbers.

License

Notifications You must be signed in to change notification settings

mgred/sqids-bazel

Repository files navigation

Sqids for Bazel

Unoffical port of sqids written in Starlark for the Bazel build tool.

Note

This library currently only works with Bzlmod.

MODULE.bazel:

bazel_dep(name = "sqids_bazel")

git_override(
    name = "sqids_bazel",
    remote = "https://github.com/mgred/sqids-bazel",
    commit = "<commit_hash>",
)

Use in file:

load("@sqids_bazel//:defs.bzl", "sqids")

genrule(
    name = "file",
    outs = ["hash"],
    cmd = "echo '%s' > $(OUTS)" % sqids().encode([1, 2, 3]),
)

About

Unofficial port of Sqids for Bazel. Generate short YouTube-looking IDs from numbers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published