npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

rust-wasmpack-loader

v3.3.2

Published

wasm Webpack/Bun loader for .rs (Rust) resources. Boost your Webpack-powered projects with native WebAssembly support using the 'rust-wasmpack-loader'. This powerful loader enables seamless integration of Rust resources, unlocking high-performance capabil

Downloads

501

Readme

MIT License View this project on NPM View this project on NPM Quality Gate Status Known Vulnerabilities

Welcome to rust-wasmpack-loader

rust-wasmpack-loader is a powerful Webpack and Bun loader that enables seamless integration of Rust resources into your JavaScript/TypeScript projects through WebAssembly (WASM).

What is rust-wasmpack-loader?

rust-wasmpack-loader is a native WASM loader for .rs (Rust) resources that works with:

  • Webpack ^5.0.0 (Both web and node (node-async) targets)
  • Bun runtime (node target only)

Key Features

🚀 Easy Integration — Import .rs files directly in your .js or .ts files without any headache

🔧 Flexible Configuration — Supports both wasm_bindgen and regular functions

📦 Smart Discovery — Dynamically finds the Cargo.toml file for building the WASM source

🌐 Multi-Target Webpack Support — Works with web and node applications

Bun Compatible — Full support for Bun runtime (node target only for now)

Why Use rust-wasmpack-loader?

  • Simplicity: The most obvious one — No complex build setups, import and use
  • Write computation-heavy code in Rust: Leverage Rust's performance for CPU-intensive tasks
  • Ecosystem: Access the rich Rust ecosystem from your any projects

Quick Example

// Import Rust code directly
import wasmModule from './fibonacci.rs';

// Use the compiled WASM module
const result = wasmModule.fibonacci(10);
console.log(result); // Output: 55
// fibonacci.rs
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub fn fibonacci(n: u32) -> u32 {
    match n {
        0 => 0,
        1 => 1,
        _ => fibonacci(n - 1) + fibonacci(n - 2),
    }
}

Getting Started

Ready to boost your projects with native WebAssembly support? Let us get started!

👉 Installation Guide

👉 Quick Start Tutorial

Examples

View Examples documentation

Check the example folder in the repository for a better understanding of how the loader works with different setups:

Contributing

Contributions are always welcome!

See CONTRIBUTING.md for ways to get started.

Please feel free to:

  • 🐛 Report bugs and issues
  • 💡 Suggest new features
  • 📖 Improve documentation
  • 🔧 Submit pull requests

Acknowledgements

Special thanks to the projects that inspired and helped make rust-wasmpack-loader possible:

License

This project is licensed under the MIT License.

See the LICENSE file for details.

Community & Support


Built with ❤️ by Yehor Brodskiy