A command line tool of encoding/decoding string to/from Base64 string. The source is written in WebAssembly text format (wat) for my learning purpose.
This package is now available in WebAssembly Package Manager (WAPM). If you have wasmer CLI installed on your machine, you can run the command like:
wasmer run etoal/base64 -e encode "Lorem ipsum"
# TG9yZW0gaXBzdW0=
This package provides two commands or entrypoints that can be specified with the -e
option.
encode
decode
Or, you can execute the commands by cloning the repository and directly specifying the wasm file:
wasmer b64decode.wasm SGVsbG8gd29ybGQh
# Hello world!