bazelbuild / starlark

Starlark Language
Apache License 2.0
2.44k stars 163 forks source link

Provide a `base64` primitive #276

Open shs96c opened 5 months ago

shs96c commented 5 months ago

When calculating things like integrity hashes (used by recent Bazel releases), it's helpful to be able to base64 encode and decode values. Starlark does not offer a mechanism to do this natively, though it may be possible to write one in pure starlark. Having a native implementation would be significantly faster (as we saw with JSON processing)

shs96c commented 5 months ago

One such pure Starlark implementation is here: https://github.com/aspect-build/bazel-lib/blob/main/lib/private/base64.bzl