# stats-rs

> Stats is a webassembly version written in Rust.

Latest version **0.1.3** (published 2020-03-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install stats-rs
pnpm add stats-rs
yarn add stats-rs
bun add stats-rs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-03-22 |
| First published | 2019-07-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 70.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | anhmv |

## Links

- npm: https://www.npmjs.com/package/stats-rs
- Repository: https://github.com/anhmv/stats.rs
- npm.io page: https://npm.io/package/stats-rs

## Recent versions

- 0.1.3 (latest) — 2020-03-22
- 0.1.2 — 2020-03-22
- 0.1.1 — 2020-03-22
- 0.1.0 — 2019-07-19

## README

# Webassembly Performance Monitor

Stats is a webassembly version of [stats.js](https://github.com/mrdoob/stats.js) written in Rust.

This crate provides a simple info box that will help you monitor your code performance,
and can be used either Javascript code or in Rust code.

* **FPS** Frames rendered in the last second. The higher the number the better.
* **MS** Milliseconds needed to render a frame. The lower the number the better.

#### Examples

**In Javascript**

Install the `stats-rs` package by using `npm` or `yarn`

```
yarn add stats-rs
```
or
```
npm install stats-rs
```

And insert the snipped code below to your application

```js
const wasm = import('stats-rs');

wasm.then(({ Stats }) => {
  const stats = Stats.init();
  stats.attach(document.body);

  function render() {
    stats.update();
    requestAnimationFrame(render);
  }

  render();
});
```

### Rust
```
// TODO
```

---
_Source: https://npm.io/package/stats-rs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
