rs1090-wasm

Crates.iors1090-wasm
lib.rsrs1090-wasm
version0.4.15
created_at2024-12-29 17:25:53.546481+00
updated_at2025-12-15 16:41:17.031809+00
descriptionA real-time comprehensive Mode S and ADS-B data decoder
homepagehttps://github.com/xoolive/jet1090
repositoryhttps://github.com/xoolive/jet1090
max_upload_size
id1498352
size204,459
Xavier Olive (xoolive)

documentation

README

rs1090-wasm

A WASM binding for the rs1090 library.

For the moment, only the decode function is wrapped.

Installation

Just run the following (or similar with your favourite package manager):

npm install rs1090-wasm

Loading

Loading is much more complicated. It depends on your environment.

We offer three subpackages:

  • ES modules (default). It loads WASM in a way that will be bundled into a single file if you use dynamic imports, or embedded into your main bundle if you use regular imports.
  • CommonJS (for node). It loads WASM using node's fs module, synchronously. Not really designed for bundling or shipping to the browser.
  • web: more customizable. This one is for when you need to load the WASM in some totally custom way.

These sub-packages are named rs1090-wasm, rs1090-wasm/nodejs, and rs1090-wasm/web, respectively.

Detailed explanations available for another library here (used as reference for the packaging)

Observable

In the Observable platform, you have to import the web library in a little convoluted way:

rs1090 = {
  let module = await import("https://unpkg.com/rs1090-wasm/web/rs1090_wasm.js");
  await module.default("https://unpkg.com/rs1090-wasm/web/rs1090_wasm_bg.wasm");
  module.run(); // get better error messages if the Rust code panics
  return module;
}

You can also just simply:

import { rs1090 } from "@xoolive/rs1090";
Commit count: 0

cargo fmt