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

wickra-terminal-wasm

v0.2.0

Published

WebAssembly bindings for wickra-terminal — the data-driven core in the browser, feeding the web renderer.

Readme

CI codecov npm License: MIT OR Apache-2.0

Wickra Terminal — WASM


▶ Live demo: the Wickra library's own 514 indicators over real Binance market data, computed live in your browser — live.wickra.org · zero backend, powered by wickra-wasm.

One core. Ten languages. Two renderers — for WASM. npm install wickra-terminal-wasm — pure WebAssembly, runs anywhere a modern JS engine does.

WebAssembly bindings for the wickra-terminal data-driven core, built with wasm-bindgen. This is the binding the web renderer runs on: build a Terminal from a JSON config, drive it with command JSON, read back frame view-models — the same protocol as the native TUI and every other binding.

The native exchange client cannot run in a browser sandbox, so the core's live feature is disabled here. The web renderer opens its own WebSocket and hands the events in through the Feed command, which is why Feed matters more to this binding than to any other.

Install

npm install wickra-terminal-wasm

Requirements

  • wasm-pack and the wasm32-unknown-unknown target
  • A bundler or an ES-module-capable browser for the web target

Building from this repository (contributors)

Build.

wasm-pack build bindings/wasm --target web                        # for the browser
wasm-pack build bindings/wasm --target nodejs --out-dir pkg-node  # for the test suite

The web target is what web/ imports; the nodejs target is the only form require() can load, which is what the tests run against.

Test.

node --test bindings/wasm/tests/*.test.cjs

Quick start

import init, { Terminal, version } from "wickra-terminal-wasm";

await init();

const term = new Terminal(JSON.stringify({
  sources: [{ Synth: { seed: 1 } }],
  layout: { panels: [{ kind: "Chart", rect: { x: 0, y: 0, w: 100, h: 100 } }] },
}));

term.command(JSON.stringify({ type: "Subscribe", source: 0, symbol: "BTC/USDT" }));
const frame = JSON.parse(term.command(JSON.stringify({ type: "Tick" })));
console.log(frame.panels[0], version());

API

| Name | Returns | |------|---------| | new Terminal(configJson) | A handle; throws on an invalid config | | term.command(cmdJson) | The frame JSON; throws on an invalid command | | term.version() | The library version | | version() | The same string, as a free function | | term.free() | Releases the handle |

free() is not optional housekeeping: wasm-bindgen hands out a pointer with no finaliser, so a terminal dropped without it leaks its linear-memory allocation for the lifetime of the page. Anything that rebuilds a terminal — a config change, a source swap — must release the old one.

The command protocol

Every binding drives the same nineteen commands, and the frame that comes back is the same JSON in all of them:

| Command | Effect | |---------|--------| | Tick | Poll every source, fold what arrived, return the frame | | Subscribe / Unsubscribe | Add or drop a market on one source | | SetFocus | Choose the market the panels render | | AddSource / RemoveSource | Attach or detach a feed at run time | | Seek | Rewind or fast-forward a replay source (the time machine) | | Feed | Hand an event to a Manual source from the host | | FeedDerivatives | Fold a derivatives update -- funding, open interest, positioning, mark/index/futures -- into a market | | AddIndicator / RemoveIndicator | Track or drop an indicator on every market | | SetTimeframe | Set the bar size the candle-input indicators are fed at | | ListIndicators | The catalogue: every indicator, profile and bar type this build accepts, each with its default parameters | | ReplayPosition | Where a replayable source stands, for a time-machine scrubber. Answers 0/0 for a source that is not a recording | | ExportRecording / SetRecording | Save the recorded events in the shape Replay takes, and turn recording on or off | | AddPanel / RemovePanel / MovePanel | Place a panel on the layout, take one off, or move and resize one -- the layout is no longer fixed at start-up |

ListIndicators is the one command that answers rather than renders, and each row carries needs_reference, which marks the pairwise indicators that compare two markets and so require a reference symbol in their spec. A row for one of the two friendly aliases also carries alias_of naming the canonical kind it builds, so Macd and MacdIndicator read as one indicator rather than two.

A frame is {"panels": [...]}, one entry per configured panel, each tagged with its panel kind — chart, book, tape, watchlist, footprint, profile, bars. See docs/ for the panel and source references.

Cross-language equality

The same config and the same command sequence produce a byte-identical frame in Rust, Python, Node.js, WASM, C, C++, C#, Go, Java and R. That is not an aspiration: golden/ holds a recorded feed and the expected frame, and every binding's test suite asserts its own output against that one file.

Benchmark

benchmarks/ reports this binding's throughput over the shared core. It measures the call overhead of wasm-bindgen, not a cross-library ratio (the same Rust core runs under every binding) — see the repository BENCHMARKS.md for the numbers, the machine and how each harness is run.

Documentation

The full guide, the spec reference and the API documentation live in the main repository and the documentation site:

Wickra Terminal ships native bindings for Python, Node.js, WASM and Rust, plus a C ABI hub that any C-capable language (C, C++, C#, Go, Java, R) links against — all forwarding to the same data-driven, unsafe-forbidden Rust core.

Security

Found a security issue? Please don't open a public issue. Report it privately via the repository's Security tab ("Report a vulnerability") or email [email protected] with a subject line starting [wickra security]. Full policy: https://github.com/wickra-lib/wickra-terminal/blob/main/SECURITY.md.

Disclaimer

This software is provided "as is", without warranty of any kind. It is a research and engineering tool, not financial advice. Trading carries risk of loss. Run in paper mode and against exchange testnets, and review the code before risking real capital.

License

Licensed under either of Apache-2.0 or MIT at your option.