Crates.io | uuid-v4-cli |
lib.rs | uuid-v4-cli |
version | 0.3.0 |
source | src |
created_at | 2022-02-27 13:24:05.652504 |
updated_at | 2022-10-26 00:01:03.894237 |
description | A CLI tool to generate UUID V4 |
homepage | https://github.com/ken-matsui/uuid-v4-cli#readme |
repository | https://github.com/ken-matsui/uuid-v4-cli/ |
max_upload_size | |
id | 540352 |
size | 31,728 |
A CLI tool to generate UUID V4 which supports both native and WebAssembly
Note: This project is a fork of the original Rust implementation: uuid-rs.
You can install this using the cargo install
command:
$ cargo install uuid-v4-cli
This application also provides a wasm package.
You can install it using wapm
by the following command:
$ wapm install ken-matsui/uuid
$ uuid --help
uuid-v4-cli 0.3.0
A CLI tool to generate UUID V4
USAGE:
uuid [OPTIONS]
OPTIONS:
-H, --hyphenated Show with hyphens
--help Print help information
-u, --uppercase Show as uppercase (default: lowercase)
--urn Show as a urn
-V, --version Print version information
$ wapm run uuid -- --help
uuid-v4-cli 0.3.0
A CLI tool to generate UUID V4
USAGE:
uuid [OPTIONS]
OPTIONS:
-H, --hyphenated Show with hyphens
--help Print help information
-u, --uppercase Show as uppercase (default: lowercase)
--urn Show as a urn
-V, --version Print version information
$ uuid
4611494855814da2a559fd0d6d422766
$ uuid -u
4D41163F06F7404BBB3A6C357062DAE0
$ uuid -H
b6dc2c9c-6408-433f-8e5b-f91677cad729
$ uuid -H -u
2FBC671A-3BD9-4BDC-B5B2-95C18CBEF900
$ uuid --urn
urn:uuid:9756279b-886a-4bc7-83ae-cefe69e8397e
$ uuid --urn -u
urn:uuid:5B91ECE3-A85D-481E-BA45-69AC04ECC0F0
$ wapm run uuid
4611494855814da2a559fd0d6d422766
$ wapm run uuid -- -u
4D41163F06F7404BBB3A6C357062DAE0
$ wapm run uuid -- -H
b6dc2c9c-6408-433f-8e5b-f91677cad729
$ wapm run uuid -- -H -u
2FBC671A-3BD9-4BDC-B5B2-95C18CBEF900
$ wapm run uuid -- --urn
urn:uuid:9756279b-886a-4bc7-83ae-cefe69e8397e
$ wapm run uuid -- --urn -u
urn:uuid:5B91ECE3-A85D-481E-BA45-69AC04ECC0F0
$ 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/uuid.wasm
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