subslay 0.1.0

SubSlay: Text β†’ emoji πŸ’…πŸ» Powered by Rust + WASM
Documentation

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
πŸ”¬ 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

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:

python3 -m http.server
# or use any local dev server of your choice

🌍 Deployment

  • The static site is hosted from the gh-pages branch.

πŸ“ Project Structure

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." πŸ’