Crates.io | base64-cli |
lib.rs | base64-cli |
version | 0.1.5 |
source | src |
created_at | 2022-02-26 05:11:46.247537 |
updated_at | 2023-03-02 22:13:42.544914 |
description | A CLI tool for base64 |
homepage | https://github.com/ken-matsui/base64-cli#readme |
repository | https://github.com/ken-matsui/base64-cli/ |
max_upload_size | |
id | 539805 |
size | 30,236 |
A CLI tool for base64 which supports both native and WebAssembly
Note: This project is a fork of the original Rust implementation: rust-base64.
You can install this using the cargo install
command:
$ cargo install base64-cli
This application also provides a wasm package.
You can install it using wapm
by the following command:
$ wapm install ken-matsui/base64
$ base64-cli --help
base64-cli 0.1.0
A CLI tool for base64
USAGE:
base64 <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
decode Decode base64 string to string
encode Encode string to base64 string
help Print this message or the help of the given subcommand(s)
$ wapm run base64 --help
base64-cli 0.1.0
A CLI tool for base64
USAGE:
base64 <SUBCOMMAND>
OPTIONS:
-h, --help Print help information
-V, --version Print version information
SUBCOMMANDS:
decode Decode base64 string to string
encode Encode string to base64 string
help Print this message or the help of the given subcommand(s)
$ base64-cli encode hello
aGVsbG8=
$ base64-cli decode aGVsbG8=
hello
$ wapm run base64 encode hello
aGVsbG8=
$ wapm run base64 decode aGVsbG8=
hello
$ cargo build
Or you can directly execute the binary:
$ cargo run
$ rustup target add wasm32-wasi
$ cargo build --target wasm32-wasi
$ wasmer run target/wasm32-wasi/debug/base64-cli.wasm encode hello
This command can also test C API.
$ cargo build
$ cargo test
$ git tag v0.1.0
$ git push origin v0.1.0
$ cargo publish
$ cargo build --release --target wasm32-wasi
$ wapm publish