https://github.com/jcbhmr/unicode-math-class.wasm
🦀 unicode-math-class Rust crate compiled to a WebAssembly component
https://github.com/jcbhmr/unicode-math-class.wasm
component component-model rust typst wasm wasm-component webassembly wit wit-bindgen
Last synced: about 2 months ago
JSON representation
🦀 unicode-math-class Rust crate compiled to a WebAssembly component
- Host: GitHub
- URL: https://github.com/jcbhmr/unicode-math-class.wasm
- Owner: jcbhmr
- License: mit
- Created: 2024-01-16T03:52:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-30T02:43:44.000Z (over 1 year ago)
- Last Synced: 2025-02-07T17:15:44.467Z (3 months ago)
- Topics: component, component-model, rust, typst, wasm, wasm-component, webassembly, wit, wit-bindgen
- Language: Rust
- Homepage: https://jcbhmr.me/unicode-math-class.wasm
- Size: 85.9 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unicode-math-class for WebAssembly
🦀 [unicode-math-class](https://crates.io/crates/unicode-math-class) Rust crate compiled to a [WebAssembly component](https://github.com/WebAssembly/component-model)
```c
class('0') //=> "normal"
class('a') //=> "alphabetic"
class('(') //=> "opening"
class('😃') //=> null
```🏷️ Uses unicode-math-class v0.1.0 \
🟪 Distributed as WebAssembly to run anywhere \
🤝 Composes well with other WebAssembly components \
0️⃣ Zero dependencies👀 You might be looking for the premade [bindings for JavaScript](#TODO) or [bindings for Python](#TODO).
## Usage

You can download the [unicode-math-class.wasm](https://github.com/jcbhmr/unicode-math-class.wasm/releases/latest/download/unicode-math-class.wasm) WebAssembly component file from [this repository's GitHub releases page](https://github.com/jcbhmr/unicode-math-class.wasm/releases). To actually _use_ the WebAssembly component, you'll need to use a [WebAssembly component host runtime](https://github.com/jcbhmr/awesome-webassembly-runtimes#readme).
[](https://github.com/jcbhmr/unicode-math-class.wasm/releases/latest/download/unicode-math-class.wasm)
How you use consume the [WIT-defined API](https://jcbhmr.me/unicode-math-class.wasm/) is determined by which [bindings generator](https://github.com/bytecodealliance/wit-bindgen) you use.
## Development

Run `make setup` or install these additional tools:
- Rust `wasm32-unknown-unknown` target
- [`cargo component`](https://github.com/bytecodealliance/cargo-component)
- [`wit-bindgen` CLI](https://github.com/bytecodealliance/wit-bindgen#cli-installation)
- [Static Web Server](https://static-web-server.net/)
- [`wasm-tools`](https://github.com/bytecodealliance/wasm-tools)You can run `make build` to build the `.wasm` file. Use `make build-docs` to build the docs. Run [the `make publish` workflow](https://github.com/jcbhmr/unicode-math-class.wasm/actions/workflows/make-publish.yml) or use `make publish` to create new releases.