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

@ferscloud/fers-calculation

v0.2.37

Published

High-performance structural engineering FEM solver compiled from Rust to WebAssembly. Runs entirely in the browser — no server round-trip per calculation.

Readme

@ferscloud/fers-calculation

High-performance structural engineering FEM solver compiled from Rust to WebAssembly. Runs entirely in the browser — no server round-trip per calculation.

Installation

npm install @ferscloud/fers-calculation

Quick start — free tier (up to 100 members)

import init, { calculate_from_json } from "@ferscloud/fers-calculation";

await init(); // load the WASM module once

const result = calculate_from_json(JSON.stringify(myModel));
const data = JSON.parse(result);

No API key required. Works for any model with up to 100 members.

Authenticated tier — Pro (up to 10 000 members)

Pro limits are unlocked by passing a short-lived signed token issued by the FERS Cloud server. The token is verified inside the WASM using an Ed25519 public key baked into the binary — it cannot be forged.

How it works

Your server  →  POST https://ferscloud.com/api/solver/token  →  signed 30-min token
                (X-API-Key: <your-api-key>)

Browser  →  calculate_from_json_with_token(model, token)  →  Pro limits unlocked

1. Get an API key

Log in at ferscloud.com, go to Profile → API Keys, and create a key. Store it as an environment variable on your server — never in browser code.

2. Backend: fetch a solve token

Your server fetches and caches the token. Example for a Next.js API route:

// pages/api/solve-token.ts
const FERS_API_KEY = process.env.FERS_API_KEY!;

let cached: { token: string; expiresAt: number } | null = null;

export default async function handler(req, res) {
  const now = Date.now();

  // Re-use if more than 5 minutes remain
  if (cached && cached.expiresAt - now > 5 * 60 * 1000) {
    return res.json({ token: cached.token });
  }

  const resp = await fetch("https://ferscloud.com/api/solver/token", {
    method: "POST",
    headers: { "X-API-Key": FERS_API_KEY },
  });

  if (!resp.ok) return res.status(502).json({ error: "Token fetch failed" });

  const { token, expiresAt } = await resp.json();
  cached = { token, expiresAt: new Date(expiresAt).getTime() };
  return res.json({ token });
}

Same pattern works for Express, Deno, Bun, Cloudflare Workers, or any server-side runtime.

3. Frontend: call the solver with the token

import init, { calculate_from_json_with_token } from "@ferscloud/fers-calculation";

await init();

const { token } = await fetch("/api/solve-token").then(r => r.json());

const result = calculate_from_json_with_token(JSON.stringify(myModel), token);
const data = JSON.parse(result);

If the token is missing, expired, or invalid, the solver falls back to the free 100-member limit — it never throws.

Tier comparison

| Feature | Free | Pro | |---|---|---| | Max members | 100 | 10 000 | | WASM function | calculate_from_json | calculate_from_json_with_token | | Requires token | No | Yes | | Token TTL | — | 30 minutes |

Security note

Keep your FERS_API_KEY server-side only. The solve token it fetches is safe to pass to the browser — it is short-lived and cryptographically signed. Only FERS Cloud can issue valid tokens; the browser WASM can only verify them.

Links