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

byuu

v0.16.0

Published

Emulation library for various game consoles

Downloads

40

Readme

byuu-web

byuu logo

Status: Dark launch (under heavy development)

byuu is a multi-system emulator that aims to combine the accuracy of higan with the simplicity and performance of bsnes.

This repository attempts to bring the goodness of the original project to the Web. We make significant changes to the repository due to WebAssembly's behavior and performance restrictions, but try to stick to accuracy as much as possible. We also make sure to keep up-to-date with upstream, and as much as possible replicate the same internal behaviors when writing alternative implementations.

Usage

Application

Go to https://wizcorp.github.io/byuu-web and enjoy!

Library

See the API documentation to learn how to connect controllers and so on! You can also have a look at the git repository's app code to see a relatively complete implementation example.

Installing the library

npm install byuu

The package contains a TypeScript type definition where the documentation of the available API can be found.

./index.js

import byuu from 'byuu'
const romPath = '/path/to/rom.sfc'
const container = document.body

// Initialization is only needed once
byuu.initialize(container)
	.then(() =>	byuu.loadURL(romPath))
	.then((romInfo) => {
		console.log('Loaded ROM:', romInfo)
    
		if (byuu.start()) {
			console.log('Emulator started successfully!')
		}
	})
	.catch((error) => console.error('Failed to load ROM!', error))

When using with Webpack, you will be required to use the file-loader loader to allow this library to properly load its WASM code.

webpack.config.js

module.exports = ( env, options ) => {
  // ...
  module: {
    rules: [
      { 
        test: /byuu-web-lib.wasm$/,
        type: 'javascript/auto',
        loader: 'file-loader',
        options: {
          name: '[name]-[hash].[ext]',         
        }
      }
    ]
  }
}

Here below is an example using Vue.js. Although untested, it should be possible to use this library similarly with other frameworks.

vue.config.js

module.exports = {
  configureWebpack: {
    module: {
      rules: [
        { 
          test: /byuu-web-lib.wasm$/,
          type: 'javascript/auto',
          loader: 'file-loader',
          options: {
            name: '[name]-[hash].[ext]',         
          }
        }
      ]
    }
  }
}

./src/components/HelloByuu.vue

<template>
  <div ref="container"></div>
</template>
<script>
import byuu from 'byuu'

export default {
  async mounted () {
    await byuu.initialize(this.$refs.container, 800, 600)
    await byuu.loadURL('/path/to/rom.sfc')
    byuu.start()
  },
  beforeDestroy() {
    byuu.terminate()
  }
}
</script>
<style scoped></style>

Development

Git is used for the development of new releases, and represents a staging environment. As byuu is rather mature, things should generally be quite stable. However, bugs will exist, regressions will occur, so proceed at your own risk.

Getting started

git clone [...] byuu-web
cd byuu-web
make all debug=true # debug is optional but strongly recommended for development
# You can also build the package and the app individually
make package
make app

To achieve acceptable performances, byuu-web changes by default how the scheduler is implemented and how each Thread's main method behaves. This can be reverted to test against upstream:

Using the standard scheduler

make debug=true synchro=false

Once you have a build, start the HTTP development server.

Serving the emulator

make serve

Cleaning builds

make clean

The emulator will be served at http://localhost:8000.

Links

Acknowledgements

We would like to give our sincere thanks to:

  • byuu for his contributions, help, and support
  • hex-usr, maintainer of the nSide fork (from which we have adapted some of the FC mappers)
  • Andrew Reading, maintainer of bsnes-mcfly (which we've looked into for ideas on optimization)