#japanese #katakana #hiragana #kana

konbaato

Conversions between different Japanese scripts

1 stable release

1.0.0 Jun 4, 2024

#3 in #hiragana

Download history 152/week @ 2024-06-03 2/week @ 2024-06-10

154 downloads per month

CC0 license

15KB
191 lines

Konbaato・コンバート

GitHub crates.io docs.rs CI

Convert between different Japanese scripts.

Ready for WASM 🌀

Use the crate in Rust

Include the latest version of konbaato in your Cargo.toml.

[dependencies]
konbaato = "1.0"

Install nix

Use the following command to install nix if you don't already have it.

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

You might need to open a new terminal for the changes to take effect.

Use the crate in JavaScript

Build the WASM package inside the developer shell for deployments.

nix develop .#deploy
just wasm

Import the output in ./pkg in JavaScript, as shown in index.html.

import init, { hira_to_kata } from './pkg/konbaato.js';

async function run() {
    await init();
    const input = "ひらがな";
    const output = hira_to_kata(input);
}

run()

Develop the crate

Run CI inside the default developer shell.

nix develop
just check

Deploy a local website.

nix develop
just serve

Run the fuzzer inside the develper shell for fuzzing.

nix develop .#fuzz
just fuzz

Dependencies

~0.7–1.4MB
~28K SLoC