A tool for managing ADRs (Architecture Decision Records) in a directory (ideally inside of a repo).
Note
Initially based on https://github.com/bradcypert/adl/
Adjusted to be built as a .wasm
as well as depending on https://github.com/karlseguin/zul/ for DateTime
formatting instead of depending on https://github.com/frmdstryr/zig-datetime.
I wondered how much smaller a .wasm
version of this CLI would be in comparison to a native executable.
As it turns out… pretty small (33K
)
That said, a native ELF binary compiled with ReleaseSmall
is just 10 K bigger than the .wasm
binary.
(A WebAssembly runtime is many orders of magnitude larger than that)
- Clone the
adr
repo somewhere, or download adr.wasm on its own. - OPTIONALLY: Rebuild the
adr.wasm
usingzig build
- Add an
adr
alias to your shell, something like:
alias adr='wasmtime run --dir . ~/Code/GitHub/peterhellberg/adr/zig-out/bin/adr.wasm'
Tip
You can also run the CLI via zig build run -- create Your new adr
- Clone the
adr
repo somewhere - Build the native
adr
binary usingzig build native
- Copy
zig-out/bin/adr
to somewhere in your path
adr create WebAssembly runtime for adr
This will create (or update) a README.md
in your adr/
directory (creating that directory if necessary).
If this was your first ADR, it would create the file 00000-WebAssembly-runtime-for-adr.md.
It would then update the README in the same directory with a link to the newly created ADR document.
adr regen
✨