about summary refs log tree commit diff
path: root/tvix/store/src/main.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-12-29T21·47+0100
committerflokli <flokli@flokli.de>2022-12-30T13·31+0000
commit357c4d4836180975b4699877b2344d1b2c88d690 (patch)
tree544aaef634a702cc02f4adb5c6498855064402a9 /tvix/store/src/main.rs
parent5ba47a2bc39b95fa4ece5d52ce08bfeda130367f (diff)
feat(tvix/store): add nixbase32 mod r/5550
This implements the nix-specific base32 encoding and decoding, exposing
a subset of the API that the data-encoding crate provides.

Nix uses a custom alphabet, no padding, and encodes bytes in reverse
order. The latter one is the reason we can't just use the data-encoding
crate directly.

Three odd corner case tests ported over from go-nix failed. We opened
b/235 to further investigate.

Change-Id: I73fab6ddd67177d882e4c3f2b48761c95853d558
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7683
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/main.rs')
-rw-r--r--tvix/store/src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/store/src/main.rs b/tvix/store/src/main.rs
index 772a45d0bd59..cca96c1bbb57 100644
--- a/tvix/store/src/main.rs
+++ b/tvix/store/src/main.rs
@@ -1,3 +1,4 @@
+mod nixbase32;
 mod proto;
 
 #[cfg(test)]