https://github.com/thoughtpolice/narinfo-tools
Simple collection of narinfo tools
https://github.com/thoughtpolice/narinfo-tools
Last synced: 3 months ago
JSON representation
Simple collection of narinfo tools
- Host: GitHub
- URL: https://github.com/thoughtpolice/narinfo-tools
- Owner: thoughtpolice
- License: apache-2.0
- Created: 2022-07-16T01:05:46.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-13T12:51:40.000Z (almost 3 years ago)
- Last Synced: 2024-12-27T09:12:02.639Z (5 months ago)
- Language: Rust
- Size: 20.5 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# `narinfo-tools`
This tool takes `.narinfo` files, and does things with them. Right now it can:
- Convert a `.narinfo` file to JSON. This is a very disgusting hack, because at
the time I originally wrote it I was awful at Rust, but it works.
- Can sign a `.narinfo` file and produce a new `.narinfo` file with a proper
`Sig:` field. This is slightly less awful but still not good, because I'm only
marginally better at Rust now.It'll do more than that, one day.
This tool is implemented in Rust and targets **[WebAssembly System
Interface][WASI]** by default for portability. So in practice, it takes input on
`stdin` and output on `stdout`, like a Unix program.There is no documentation. Read the source code to see how it works, it's fairly
simple. You mostly just provide `stdin` and some environment variables, and read
`stdout`.## Motivation
The goal is to allow its use in a wide array of contexts: there are WebAssembly
engines available for almost all major programming languages, so you can just
embed the `.wasm` binary into your program and run it as a program. Consider
this an experimental alternative to the "normal" foreign interface method of
using the C ABI.More specifically, I wanted to manipulate nar files in "serverless" computing
environments like Cloudflare Workers and Fastly Compute@Edge.By default, **[Wasmtime]** is used for executing programs.
[Nix]: https://nixos.org/nix
[WASI]: https://wasi.dev
[Wasmtime]: https://wasmtime.dev## License & Acknowledgements
© 2022 Austin Seipp. Dually available under the MIT/Apache-2.0 licenses, like most Rust projects.