π§ β¨ Text to Emoji Transformation powered by Rust + WebAssembly
SubSlay is a blazing-fast emoji transformer powered by a pure Rust core compiled to WebAssembly, offering semantic text-to-emoji conversion with stylish flair.
- The emoji transformation logic lives in the Rust crate
subslay. - The WebAssembly wrapper crate
subslay-wasmexposes the functionality for web use. - The static frontend is hosted via GitHub Pages on the
gh-pagesbranch and consumes the WASM package fromsubslay-wasm.
π Try the Demo
π¬ Source code is maintained in the main branch.
- π¦ Core emoji transformation implemented in Rust as a reusable crate
- β‘ WebAssembly wrapper for fast browser execution
- 𧬠Uses GloVe embeddings + Levenshtein distance fallback
- π Static frontend deployed on GitHub Pages with WASM package auto-updates
- π¨ Stylish glassmorphism UI with animated gradient text and emojis
- π₯ Instant, debounced input-to-emoji transformation with error handling
β¨ Example:
"Hello, World!"β"π π"
-
The
subslaycrate contains the core logic:- Parses
emoji.json(keyword β emoji map) - Loads GloVe vectors (
glove.txt) for semantic similarity - Uses Levenshtein distance as a fallback
- Parses
-
The
subslay-wasmcrate wraps the core withwasm-bindgen, exposing aWasmStylistclass to JavaScript. -
The frontend:
- Loads the WASM package built by
wasm-pack - Uses the embedded JSON and GloVe data within the WASM module, avoiding separate static file fetches
- Provides a sleek interface for users to input text and see emoji output live
- Loads the WASM package built by
git clone https://github.com/8ria/subslay.git
cd subslay
cargo build --release # Build core crate
cd ../subslay-wasm
wasm-pack build --target web # Build WASM packageCopy or link your pkg/ folder generated from subslay-wasm to your website/ folder.
cd ../website
python3 -m http.server 8000Open http://localhost:8000 in your browser.
-
The
gh-pagesbranch hosts the static site (frontend files + WASM pkg). -
A GitHub Actions workflow automatically:
- Builds the WASM package from
subslay-wasmonmainbranch pushes - Cleans old WASM files from
gh-pages/pkg - Copies new WASM build into
gh-pages/pkg - Commits and pushes changes, preserving other assets like
index.html,images/, andCNAME
- Builds the WASM package from
main/
βββ subslay/ # Core Rust crate (logic + data)
β βββ Cargo.toml
β βββ src/lib.rs
β βββ static/
β β βββ emoji.json
β β βββ glove.txt
β βββ README.md
β
βββ subslay-wasm/ # WASM wrapper crate exposing wasm_bindgen API
βββ Cargo.toml
βββ src/lib.rs
Pull requests are welcome! Consider contributing by:
- Adding or refining emoji mappings
- Improving embedding logic or fallback handling
- Optimizing WASM build or Rust performance
- Enhancing the frontend UI/UX
MIT License Β© AndriaK
- π§
subslayβ Core Rust emoji binding crate - π¬
discord-botβ Fun emoji Discord bot using SubSlay - π
subslay.appβ Web client for live emoji translation
"Built to slay, not obey." π π»