# SubSlay π
π»
π§ β¨ **Text to Emoji Transformation powered by Rust + WebAssembly**
---
## π§Ύ Overview
**SubSlay** is a blazing-fast, web-based emoji transformer built in Rust and compiled to WebAssembly.
It intelligently converts your text into an emoji-fied expression using semantic similarity and fabulous flair.
The Rust core powers the logic. The frontend is statically hosted via GitHub Pages.
π [Try the Demo](https://andriak.com/subslay/)
π¬ Source code lives right here in the `main` branch.
---
## π‘ Features
- π¦ Rust-powered emoji transformation logic
- β‘ WebAssembly compilation for performance
- 𧬠Uses GloVe word embeddings + Levenshtein fallback
- π Deployed with GitHub Pages
- π¨ Sleek animated UI with a gradient-glow glass aesthetic
- π₯ Instant transformation with debounced input
> β¨ **Example**: `"Hello, World!"` -> `"π π"`
---
## π οΈ How It Works
The core Rust logic uses:
- A mapping of keywords β emojis (`emoji.json`)
- GloVe embeddings for vector similarity
- Levenshtein distance for unknown word fallback
- WebAssembly interface via `wasm-bindgen`
The frontend:
- Loads the WASM module (`subslay_bg.wasm`)
- Loads embeddings and emoji map
- Lets users type and instantly see the emoji-fied output
---
## π Get Started (Locally)
### 1. Build the WASM package
```bash
wasm-pack build --target web
````
This will create a `pkg/` folder with `subslay.js` and `subslay_bg.wasm`.
### 2. Serve the frontend
Make sure `index.html`, `pkg/`, and `static/` are in the root. Then serve using:
```bash
python3 -m http.server
# or use any local dev server of your choice
```
---
## π Deployment
* The static site is hosted from the [`gh-pages`](https://github.com/8ria/subslay/tree/gh-pages) branch.
---
## π Project Structure
```bash
subslay/
βββ src/
β βββ lib.rs # Rust logic: text β emoji transformer
βββ static/
β βββ emoji.json # Keyword to emoji map
β βββ glove.txt # GloVe vectors
βββ pkg/ # Auto-generated WebAssembly files
βββ index.html # UI and JS logic
βββ Cargo.toml # Rust project config
βββ LICENSE # MIT License
βββ README.md # Youβre here π
π»
```
---
## π§βπ» Contributing
Pull requests are welcome! Feel free to:
* Add new emoji mappings
* Improve GloVe or fallback logic
* Optimize the Rust or WASM build
* Beautify the frontend more β¨
---
## π License
MIT Β© AndriaK
---
> *"Built to slay, not obey."* π