Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.01 KB

File metadata and controls

38 lines (31 loc) · 1.01 KB

build

Multiformats zig

This is the zig implementation of the multiformats spec.

Build

git clone --recurse-submodules git@github.com:zen-eth/multiformats-zig.git
cd multiformats-zig
zig build test --summary all

Generate the code

zig build-exe src/generate.zig
./generate

Add to your project

zig fetch --save https://github.com/zen-eth/multiformats-zig/archive/main.tar.gz

Usage

const multiformats = @import("multiformats-zig");

Benchmark

git clone --recurse-submodules git@github.com:zen-eth/multiformats-zig.git
cd multiformats-zig
zig build bench --release=fast -Dcode=7

tip: The code parameter in the command can refer to the declaration in the MultiBaseCodec.fromCode() in the source file src/multibase.zig.

License

MIT