968258dc1b1230493d8f1677097c832a3d7e0bd8.tar.gz
A complete implementation of the Bottom Spec in Zig with both encoding and decoding capabilities.
# Basic build
zig build
# Run tests
zig build test-exe # CLI tests
zig build test-lib # Library tests
# Install library only
zig build install-lib
# Build WebAssembly
zig build wasm-shared
# Build benchmarks
zig build benchmark
# Run benchmarks
zig build run-benchmark
As a dependency in your build.zig.zon
via zig fetch. use the standard way of adding a module to your project.
# Encode
bottom-zig
--bottomify "Hello World" # 🫂💖✨✨,,👉👈💖✨✨🫂👉👈💖✨✨,👉👈💖✨,,👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈💖✨,,👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈✨✨,👉👈💖✨✨✨👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈💖✨,,👉👈💖✨✨✨👉👈
# Decode
bottom-zig --regress "🫂💖✨✨,,👉👈💖✨✨🫂👉👈💖✨✨,👉👈💖✨,,👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈💖✨,,👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈✨✨,👉👈💖✨✨✨👉👈💖✨✨✨,👉👈💖✨✨✨,,👉👈💖✨,,👉👈💖✨✨✨👉👈" # Hello World
# Use with files
bottom-zig --bottomify -i input.txt -o output.txt
bottom-zig --regress -i output.txt
See include/bottom.h
for the API definition.
For an example of how to use the C API, see src/example.c
.
Try it in WebAssembly: https://deecellar.github.io/bottom-zig/
Pre-built binaries for Linux, macOS and Windows (x86_64) are available in CI artifacts.
MIT License