wasmhub

Crates.iowasmhub
lib.rswasmhub
version0.0.2
created_at2026-01-12 22:22:52.678223+00
updated_at2026-01-12 22:22:52.678223+00
descriptionDownload and manage WebAssembly runtimes for multiple languages
homepage
repositoryhttps://github.com/anistark/wasmhub
max_upload_size
id2038949
size122,609
Ani (anistark)

documentation

README

🚀 WasmHub

Open-source WASM Hub of language runtimes

Download and manage WASM runtimes for Node.js, Python, Ruby, PHP, Go, and more - all in one place.

Crates.io License: MIT CI


🎯 What is this?

A centralized, open-source repository providing versioned WASM language runtimes that can be:

  • Downloaded once, cached forever
  • Used in any Rust project as a library
  • Accessed via CLI tool
  • Fetched via CDN for browser usage

Think of it as: A package registry for WASM language runtimes (like npm, but for runtime binaries).


⚡ Quick Start

As a Library (Rust)

# Cargo.toml
[dependencies]
wasmhub = "0.1"
use wasmhub::{RuntimeLoader, Language};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let loader = RuntimeLoader::new();

    // Download Node.js v20.2.0 (auto-cached)
    let nodejs = loader.get_runtime(Language::NodeJs, "20.2.0").await?;

    println!("Runtime at: {}", nodejs.path.display());
    Ok(())
}

As a CLI Tool

# Install
cargo install wasmhub --features cli

# Download runtimes
wasmhub get nodejs@20.2.0
wasmhub get python@3.11.7

# List available
wasmhub list

# Show info
wasmhub info nodejs

Via CDN (Browser)

// Direct download
const url = 'https://cdn.jsdelivr.net/gh/anistark/wasmhub@latest/runtimes/nodejs/v20.2.0.wasm';
const response = await fetch(url);
const wasmBytes = await response.arrayBuffer();

🌟 Features

  • Multi-language support - Node.js, Python, Ruby, PHP, Go, Rust
  • Version management - Pin to specific versions
  • Smart caching - Download once, use forever
  • Type-safe API - Rust library with compile-time guarantees
  • Fast downloads - Parallel, resumable transfers
  • CDN distribution - Served via jsDelivr for browser access
  • SHA256 verification - Integrity checks built-in
  • Cross-platform - Works on Windows, macOS, Linux

📦 Available Runtimes

Language Versions Size Source
Node.js 18.x, 20.x, 22.x ~50MB nodebox
Python 3.11.x, 3.12.x ~35MB Pyodide
Ruby 3.2.x ~20MB ruby.wasm
PHP 8.3.x ~15MB php-wasm
Go 1.21.x ~30MB TinyGo
Rust Latest Varies Native WASM target

More languages coming soon! PRs welcome.


🚀 Use Cases

1. Browser-Based Development Environments

Build tools like StackBlitz/CodeSandbox without the proprietary runtime:

// Load Node.js in browser
let nodejs_wasm = loader.get_runtime(Language::NodeJs, "20.2.0").await?;
// Run user's project in WASM VM

2. Serverless Edge Functions

Deploy language runtimes to Cloudflare Workers, Deno Deploy, etc.:

wasmhub get python@3.11.7
# Deploy to edge with Python support

3. Testing Frameworks

Run tests in isolated WASM environments:

// Test with specific Node.js version
let node18 = loader.get_runtime(Language::NodeJs, "18.19.0").await?;
run_tests_with_runtime(node18)?;

4. Educational Platforms

Create online code editors with multiple language support:

// Student selects Python 3.12
const runtime = await fetchRuntime('python', '3.12.0');
executeCode(studentCode, runtime);

📖 Documentation


🤝 Contributing

We welcome contributions! This project aims to be community-driven.

How to help:

  • 🐛 Report bugs or request features via Issues
  • 🔧 Submit PRs for new runtimes or improvements
  • 📖 Improve documentation
  • ⭐ Star the repo to show support

See CONTRIBUTING.md for guidelines.


🌐 Community & Support


📄 License

MIT License - see LICENSE for details.


🙏 Acknowledgments

This project builds upon the amazing work of:


⚡ Why WASM Runtime?

The Problem: Language runtimes for WASM are scattered across different projects. Finding, downloading, and managing them is painful.

The Solution: A single, centralized repository with:

  • ✅ Versioned runtimes for multiple languages
  • ✅ Consistent APIs (Rust library + CLI)
  • ✅ CDN distribution for browsers
  • ✅ Smart caching and integrity verification
  • ✅ Open-source and community-driven

Join us in making WASM runtimes accessible to everyone! 🚀


Made with ❤️ by Kumar Anirudha

Commit count: 4

cargo fmt