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

stabileo-engine

v0.2.0

Published

Typed WebAssembly bindings for the Stabileo structural analysis engine

Readme

stabileo-engine

Typed ESM bindings for the Stabileo structural-analysis engine. The package ships compiler-derived TypeScript models, bundled wasm-bindgen glue, and stabileo-engine.wasm as a sibling asset.

npm install stabileo-engine
import { initStabileoEngine } from "stabileo-engine";

const engine = await initStabileoEngine();
const results = engine.solve2D({
  nodes: {
    "1": { id: 1, x: 0, z: 0 },
    "2": { id: 2, x: 5, z: 0 },
  },
  materials: { "1": { id: 1, e: 200e6, nu: 0.3 } },
  sections: { "1": { id: 1, a: 0.01, iz: 1e-4 } },
  elements: {
    "1": { id: 1, type: "frame", nodeI: 1, nodeJ: 2, materialId: 1, sectionId: 1 },
  },
  supports: { "1": { id: 1, nodeId: 1, type: "fixed" } },
  loads: [{ type: "nodal", data: { nodeId: 2, fx: 0, fz: -100, my: 0 } }],
});

Initialization

initStabileoEngine() loads stabileo-engine.wasm relative to the bundled JavaScript. It reads the asset from the filesystem in Node and fetches it in browsers and Workers. The WASM is included in the npm package, but is not base64-inlined into JavaScript.

Custom bytes, responses, URLs, and precompiled modules are supported:

const engine = await initStabileoEngine({ wasm: fetch(myWasmUrl) });

const syncEngine = initStabileoEngineSync({
  wasm: new WebAssembly.Module(wasmBytes),
});

Successful initialization is idempotent: async, concurrent, repeated, and sync calls share one engine handle. Every upstream operation has a camel-cased, object-in/object-out method. engine.raw exposes the corresponding original snake_case wasm-bindgen functions for low-level JSON/value transport.

Generated types and vendoring

The checked-in Rust snapshot is recorded in vendored/STABILEO_REVISION. Updating it is an explicit local action:

npm run vendor
npm run build:wasm
npm run bindings:update

npm run vendor sparse-clones only upstream engine/, preserves its AGPL license, and atomically replaces the snapshot. STABILEO_REF can select a tag or commit. CI and release workflows never call the vendor command; they build only the reviewed source already present in this repository.

Bindings come from nightly cargo rustdoc JSON and resolved Serde attributes. The small manifest records only exported Rust roots, scalar ABI parameters, transport, and method names. Generation fails on unsupported constructs, missing wasm-bindgen exports, or changes to the semantic bindings lock. This prevents silent any fallbacks and schema drift.

Timber scope

Stabileo includes NDS timber member design checks and supports analysis with user-supplied effective section/material properties. It does not implement an orthotropic material model: the solver accepts one E and one Poisson ratio and derives isotropic shear modulus. CLT, plywood, or other directional materials therefore require precomputed effective properties; this SDK does not claim orthotropic timber or laminate analysis.

Development

The pinned toolchain is nightly Rust with rust-src, wasm32-unknown-unknown, wasm-pack 0.13.1, Node 22+, and pnpm 10.33.0.

pnpm install --frozen-lockfile
pnpm check
pnpm release:pack

pnpm check compiles the checked-in Rust, verifies the semantic bindings lock, builds with tsdown, runs Node and browser integration tests, checks declarations with TypeScript, runs publint and Are the Types Wrong, and validates the npm tarball. pnpm release:pack leaves the verified stabileo-engine-<version>.tgz in the project root.

License and provenance

This derivative package and the vendored Stabileo engine are distributed under AGPL-3.0-only. See LICENSE, the vendored copy at vendored/stabileo/LICENSE, and the pinned upstream revision at vendored/STABILEO_REVISION.

GitHub releases attach the exact npm tarball plus a byte-identical stabileo-engine.wasm. Trusted npm publication uses GitHub Actions OIDC; public releases receive npm provenance automatically.