diff --git a/README.md b/README.md index 701c9ac..47b3119 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,6 @@ HOTP([RFC 4226](https://tools.ietf.org/html/rfc4226)) & TOTP([RFC 6238](https:// [https://totp-wasm.vercel.app](https://totp-wasm.vercel.app) -## Prerequisites - -- [Rust](https://www.rust-lang.org) -- [Node.js](https://nodejs.org) - ## Usage ### Deno @@ -42,6 +37,11 @@ console.log(code) ## Build +Prerequisites + +- [Rust](https://www.rust-lang.org) +- [Node.js](https://nodejs.org) + ```bash rustup target add wasm32-unknown-unknown cargo install --version=0.2.86 wasm-bindgen-cli diff --git a/packages/totp-wasm/README.md b/packages/totp-wasm/README.md index 4a50c6d..2eed6c3 100644 --- a/packages/totp-wasm/README.md +++ b/packages/totp-wasm/README.md @@ -23,6 +23,47 @@ console.log(code) // 473526 ``` +### Browser + +[example](https://github.com/gizmo-ds/totp-wasm/blob/main/examples/browser) + +### Node.js + +[example](https://github.com/gizmo-ds/totp-wasm/blob/main/examples/node) + +### Bun + +[example](https://github.com/gizmo-ds/totp-wasm/blob/main/examples/bun) + +## Build + +Prerequisites + +- [Rust](https://www.rust-lang.org) +- [Node.js](https://nodejs.org) + +```bash +rustup target add wasm32-unknown-unknown +cargo install --version=0.2.86 wasm-bindgen-cli +pnpm install +node scripts/build.mjs +``` + +## Runing examples + +```bash +cd examples/browser +pnpm install +pnpm dev +``` + +# Related Projects + +Here are some related projects that you may find useful: + +- [totp-wasm-zig](https://github.com/gizmo-ds/totp-wasm-zig): Zig implementation of this project. +- [UdonOTPLib](https://github.com/gizmo-ds/UdonOTPLib): C# implementation for the VRChat game. + ## License Code is distributed under [MIT](https://github.com/gizmo-ds/totp-wasm/blob/main/LICENSE) license, feel free to use it in your proprietary projects as well.