subslay 0.1.2

SubSlay: Text → emoji 💅🏻 Powered by Rust + WASM
Documentation

SubSlay 💅🏻

SubSlay transforms your text into emojis — powered by Rust & WebAssembly!
Convert words into matching emojis with smart fuzzy matching and word embeddings, all embedded inside the crate.


Features

  • Translate text → emojis using embedded emoji-keyword map
  • Fuzzy matching via Levenshtein distance
  • Semantic similarity using GloVe embeddings
  • Zero setup — data files included inside the crate
  • Works natively in Rust apps and as WebAssembly for web apps

Installation

Add SubSlay to your Cargo.toml dependencies:

subslay = "0.1"


Native Rust Usage

use subslay::EmojiStylist;

fn main() {
    let slayer = EmojiStylist::default().expect("Failed to load SubSlay data");
    let emojis = slayer.slay("hello world");
    println!("{:?}", emojis); // Output: ["👋", "🌍"]
}

WASM Usage (for Web)

If targeting WebAssembly, SubSlay exposes a convenient interface:

use wasm_bindgen::prelude::*;
use subslay::WasmEmojiStylist;

#[wasm_bindgen]
pub fn slay(input: &str) -> JsValue {
    WasmEmojiStylist::new()
        .unwrap()
        .slay(input)
}

Build with:

wasm-pack build --target web

and then import the generated WASM module in your JavaScript/TypeScript frontend.


Examples

Try the included example:

cargo run --example basic


License

MIT License


Repository

https://github.com/8ria/subslay


Made with 💅🏻 by AndriaK