Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmo-ds committed Mar 4, 2024
1 parent 5fcd0c4 commit 36b222d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions packages/totp-wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 36b222d

Please sign in to comment.