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

wasm-agent-based-models

v0.1.0

Published

Reliable and efficient agent-based models in Rust and WebAssembly

Readme

wasm-agent-based-models

Reliable and efficient agent-based models in Rust and WebAssembly

Copyright (C) 2020 Fabio Correa [email protected]

https://github.com/facorread/wasm-agent-based-models

https://gitlab.com/facorread/wasm-agent-based-models

Introduction

Please check out the README for rust-agent-based-models first.

Agent-based models (ABM) are computer programs that define agents, virtual entities that imitate the decision-making processes and interactions of real people, animals, neurons, etc. [wasm-agent-based-models] is an interactive version of rust-agent-based-models that runs in a web browser. The researcher can copy code from one project into the other to explore model behavior. While rust-agent-based-models explores multiple, independent runs of the model under a wide range of parameter scenarios automatically, wasm-agent-based-models visualizes one run of the model while the researcher freely varies parameters, pauses the model, and explores alternative behavior using interactive controls.

Why WebAssembly?

Rust offers a range of tools to develop graphical user interfaces (GUIs); in 2020, these projects were still experimental, but I needed stable tools for a modeling GUI. I decided to use WebAssembly because it has a longer track record and it is an open standard available on Windows, Linux, and Mac systems.

Getting started

To get started with wasm-agent-based models, decent knowledge of html, css, and javascript is required. You should also read the Rust and WebAssembly book, and follow the setup instructions therein. npm is strongly recommended.

After you have started with rust-agent-based-models, [Clone this repository] (https://github.com/facorread/wasm-agent-based-models.git) and use your favorite terminal to run wasm-pack build --target web. Follow the instructions on screen.

Once you have verified that the code builds, take some time to understand the similarities and differences between this project and rust-agent-based-models. This allows you to see the code that needs to be copied from one project into the other, and decide what parameters you want to explore as you work on designing your own ABM.

To examine the differences between the two programs, you can use [diff], for example:

diff -u rust-agent-based-models/src/main.rs wasm-agent-based-models/src/lib.rs

To examine the similarities between the two programs, you can use [fgrep]:

fgrep -xf rust-agent-based-models/src/main.rs wasm-agent-based-models/src/lib.rs

Why make these two separate projects? / Do I need to copy code from one project into the other verbatim?

Sometimes you want to copy the full model from one project to another, and sometimes you want to explore changes to just one of the concepts or algorithms. These projects are complementary rather than redundant.

Does this repository use unsafe code?

Not explicitly.

Acknowledgements

This project was created using the wasm-pack-template template by the rust-wasm team.

The www/ directory comes from the create-wasm-app template by Ashley Williams of the rust-wasm team.