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

water-lang

v0.3.1

Published

The compiler for the Water programming language.

Readme

Water Programming Language

Water compiles easily maintainable high-level code directly to WebAssembly. It supports all of the newest WebAssembly features, covering all stage 5 and 4 proposals, offering convenient abstractions for each feature together will full low-level access. Water supports template generics for classes and functions, arrow functions and closures, operator overloading, multivalued types, inline assembly, and many other modern language features such as all statements being expressions. Find out more at the official website.

Documentation

You can find comprehensive documentation for this programming language here.

Installation

Use npm install water-lang to install this package.

This package contains the compiler, which converts valid Water source code to a WebAssembly binary. It can be used directly like this:

import Compile from "water-lang/Compile";

const CompiledBinary = Compile(`
  export "Add" i32 Add(i32 a, i32 b) a + b;
`);

const Module = new WebAssembly.Module(CompiledBinary);
const Instance = new WebAssembly.Instance(Module);

console.log(Instance.exports.Add(11, 22)); // 33

Webpack

If you are using Webpack, a loader is included in this package for your convenience.

To use the loader, you will need to modify the Webpack configuration file in your project, typically named webpack.common.js, and add the following new configuration entry under the module.exports.module.rules array:

{
  "test": /\.(water|wtr)$/i,
  "use": ["water-lang/Webpack"]
}

To clarify, the configuration should look something like this in the end:

module.exports = {
  "module": {
    "rules": [
      {
        "test": /\.(water|wtr)$/i,
        "use": ["water-lang/Webpack"]
      },
      // ...
    ],
    // ...
  },
  // All other configuration entries ...
};

After this is done, you will be able to import compiled versions of Water files directly into your Javascript files:

import CompiledBinary from "./Add.water"; // The `.wtr` extension also works

const Module = new WebAssembly.Module(CompiledBinary);
const Instance = new WebAssembly.Instance(Module);

console.log(Instance.exports.Add(11, 22));

Other loaders

Support for other loaders has not been implemented yet, but if you would like to contribute, please open an issue or pull request on Github.

Case study

This programming language has seen extensive use in the multiplatform Permille.io voxel game engine, which runs entirely in a web browser. Water enabled the use of low-level performance enhancing intrinsics such as SIMD in a high-level fashion, drastically reducing development times while offering a 10x speed improvement over equivalent Javascript implementations (partly due to such performance enhancers not being accessible from Javascript). As Water is designed specifically for WebAssembly, easy integration with the ecosystem of the Web was possible, thus further demonstrating its practical utility. The end result is sub-second world loading times and near-native performance on the web.

Credits

This project depends on Binaryen and its port to Javascript by the AssemblyScript team.

This project would not have been possible without the excellent work of all of Binaryen's contributors! The same goes for the WebAssembly standardisation team. Thank you all :)

All other code and supporting documentation has been written exclusively by me up to this point, without the use of AI technology, to ensure a high standard of quality and reliability.

Contributing

This project is now open to contributions! Please feel free to push commits and open issues on the github. You can also join the community discord.