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 🙏

© 2026 – Pkg Stats / Ryan Hefner

growtopia.wasm

v0.2.0

Published

A Universal Growtopia ENet WASM for Node.js, Bun.js (replacement for growtopia.js)

Downloads

477

Readme

growtopia.wasm

NPM Version NPM Downloads Build Status

A universal Growtopia ENet library compiled to WebAssembly (WASM) for Node.js, Bun.js. Designed as a cross-platform replacement for growtopia.js.

Why replacement of growtopia.js?

growtopia.js relied on native Rust bindings compiled via napi-rs, requiring platform-specific binary builds and causing compatibility issues across different platforms. growtopia-wasm solves this by compiling the Rust core ENet library directly into WebAssembly, guaranteeing seamless execution across Node.js, Bun.js environments.

Differences between growtopia.js and growtopia.wasm

| Feature / Aspect | growtopia.js | growtopia.wasm | | --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------- | | Core Engine | Native Node.js bindings (napi-rs / .node) | Rust compiled to WebAssembly (wasm-pack) | | Platform Support | Requires OS/CPU specific native binaries | Single WASM binary (Runs on Windows, Linux, macOS, Android, etc.) | | Installation | Heavy; may fail on unsupported OS/arch without C++ compiler | Zero native compilation; instant install | | Network Transport | Native C ENet sockets | TS transport bridge (dgram for Node/Bun) |

Installation

npm install growtopia.wasm

or with Bun:

bun add growtopia.wasm

ENet Server Example

import { NodeENetServer, init, Packet, PacketKind } from "growtopia.wasm";

async function main() {
  // Initialize WebAssembly core
  await init();

  // Initialize ENet server host (IP, Port, Max Peers, Channels)
  const server = new NodeENetServer("127.0.0.1", 17091, 1024, 2);
  await server.start();

  // Start event polling loop
  server.startPolling(15);

  server.emitter.on("connect", peer => {
    console.log(`Client connected: ID ${peer.id} from ${peer.ip}:${peer.port}`);

    // Send Hello packet (Type 1)
    const helloPayload = new Uint8Array([1, 0, 0, 0, 0]);
    const helloPacket = new Packet(helloPayload, PacketKind.Reliable);
    peer.send(helloPacket);
  });

  server.emitter.on("disconnect", (peer, data) => {
    console.log(`Client disconnected: ID ${peer.id}, code: ${data}`);
  });

  server.emitter.on("receive", (peer, packet, channelId) => {
    const data = packet.data();
    console.log(`Received ${data.length} bytes on channel ${channelId} from peer ${peer.id}`);
  });
}

main();

ENet Client Example

import { NodeENetClient, init } from "growtopia.wasm";

async function main() {
  await init();

  const client = new NodeENetClient("0.0.0.0", 0, 1, 2);
  await client.start();

  const peer = client.connect("127.0.0.1", 17091, 2, 0);
  client.startPolling(15);

  client.emitter.on("connect", p => {
    console.log(`Connected to server! Peer ID: ${p.id}`);
  });

  client.emitter.on("disconnect", (p, data) => {
    console.log(`Disconnected from server. Code: ${data}`);
  });

  client.emitter.on("receive", (p, packet, channelId) => {
    const data = packet.data();
    console.log(`Received packet on channel ${channelId}: ${data.length} bytes`);
  });
}

main();

Packet Serialization Example

import { TextPacket, TankPacket, Variant } from "growtopia.wasm";

// Text Packet (Action / Login)
const textPacket = TextPacket.from(3, "action|refresh_item_data", "");
const textBuf = textPacket.parse();

// Tank Packet (State / Motion)
const tankPacket = TankPacket.from({
  type: 0x3,
  netID: 10,
  xPos: 100.5,
  yPos: 200.25
});
const tankBuf = tankPacket.parse();

// Variant List Packet
const variant = Variant.from({ netID: 1, delay: 0 }, "OnConsoleMessage", "Hello Growtopia!");
const variantTankPacket = variant.parse();

Links