A high-performance commenting system powered by Rust, WebAssembly (WASM), and GitHub Discussions.
Komment provides a secure, fast, and modern way to add discussions to your website without managing a database. It mirrors the core functionality of giscus but is built entirely with Rust on both the client and the server.
- Blazing Fast: Powered by Rust compiled to WASM.
- No Database: Uses GitHub Discussions as the data store.
- Zero-Config Styling: All CSS is bundled in the script; just add the container.
- Portable Script: Load
komment-embed.jsfrom any domain or CDN. - Multi-Domain Support: A centralized OAuth callback allows one deployment to serve multiple sites.
- Full CRUD: Post, Edit, and Delete comments with a modern icon-based UI.
- Automatic Provisioning: Automatically creates threads for new pages with a reference link to the source.
To use komment on any website, simply add the following:
<!-- 1. The container -->
<div class="komment"></div>
<!-- 2. Load and Initialize -->
<script type="module">
// Load the script from your deployed worker
import "https://your-worker.workers.dev/komment-embed.js";
// Initialize with your repo and config
komment('your-username/your-repo', {
clientId: 'your-github-client-id' // From your GitHub App
});
</script>- Rust (2024 edition)
- wasm-pack v0.15.0+
- worker-build (
cargo install worker-build) - Cloudflare Wrangler CLI
- Just (optional, but recommended for build commands)
The project uses a justfile for easy management.
# Rebuild WASM and deploy everything to Cloudflare
just deploy- Create a GitHub App.
- Set Callback URL to your worker's callback endpoint:
https://your-worker.workers.dev/api/auth/callback - Under Permissions, set Repository permissions -> Discussions to
Read & write. - Enable Discussions in your target repository settings.
Run these in the worker/ directory:
cd worker
npx wrangler secret put GITHUB_CLIENT_ID
npx wrangler secret put GITHUB_CLIENT_SECRET- HOW-TO-USE.md: Step-by-step setup guide.
- DESIGN.md: Internal architecture and design decisions.
- CLOUDFLARE.md: Worker-specific deployment details.
- SECURITY.md: Details on how secrets and tokens are handled.
Dual-licensed under MIT and Apache 2.0. Copyright (c) 2026 Seungjin Kim.