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

@goplasmatic/dataflow-wasm

v2.0.15

Published

WebAssembly bindings for dataflow-rs workflow engine

Readme

@goplasmatic/dataflow-wasm

WebAssembly bindings for dataflow-rs workflow engine

License: Apache 2.0 npm


WebAssembly bindings for dataflow-rs, enabling high-performance workflow execution in the browser. Run the same workflow engine that powers your Rust backend directly in JavaScript/TypeScript applications.

Features

  • Browser Execution - Run dataflow-rs workflows directly in the browser
  • Full Feature Parity - Same workflow engine as the native Rust version including all built-in functions
  • Built-in Functions - parse, map, validation, publish
  • TypeScript Support - Full type definitions included
  • Execution Tracing - Debug workflows with step-by-step execution traces and message snapshots

Installation

npm install @goplasmatic/dataflow-wasm

Quick Start

import init, { WasmEngine } from '@goplasmatic/dataflow-wasm';

// Initialize WASM module
await init();

// Define workflows
const workflows = [
  {
    id: 'my-workflow',
    name: 'My Workflow',
    tasks: [
      {
        // Parse the raw payload string into data
        id: 'parse-payload',
        name: 'Parse Payload',
        function: {
          name: 'parse',
          input: {}
        }
      },
      {
        id: 'task-1',
        name: 'Transform Data',
        function: {
          name: 'map',
          input: {
            mappings: [
              { path: 'data.output', logic: { var: 'data.input' } }
            ]
          }
        }
      }
    ]
  }
];

// Create engine
const engine = new WasmEngine(JSON.stringify(workflows));

// Process a payload (raw string - parsed by the parse plugin)
const payload = '{"input": "hello"}';
const result = await engine.process(payload);
const parsed = JSON.parse(result);
console.log(parsed.context.data); // { input: 'hello', output: 'hello' }

API

WasmEngine

class WasmEngine {
  // Create engine from JSON string of workflow definitions
  constructor(workflows_json: string);

  // Process a raw payload string through all workflows
  // The payload is stored as-is and should be parsed by the parse plugin
  process(payload: string): Promise<string>;

  // Process with execution trace for debugging
  process_with_trace(payload: string): Promise<string>;

  // Get number of registered workflows
  workflow_count(): number;

  // Get list of workflow IDs as JSON array string
  workflow_ids(): string;
}

Standalone Function

// Process a payload through a one-off engine (convenience function)
// Use WasmEngine class for better performance when processing multiple payloads
function process_message(workflows_json: string, payload: string): Promise<string>;

Payload Handling

The payload is stored as a raw string and is not automatically parsed. Use the parse plugin as the first task in your workflow to parse JSON/XML payloads into context.data:

{
  id: 'parse-payload',
  name: 'Parse Payload',
  function: {
    name: 'parse',
    input: {
      source: 'payload',      // default
      target: 'data',         // default
      format: 'json'          // default, or 'xml'
    }
  }
}

Message Structure

The processed message has the following structure:

interface Message {
  id: string;
  payload: string;              // Raw payload string
  context: {
    data: object;               // Parsed data (populated by parse plugin)
    metadata: object;           // Workflow metadata
    temp_data: object;          // Temporary data during processing
  };
  audit_trail: AuditEntry[];    // Execution history
  errors: ErrorInfo[];          // Any errors that occurred
}

Building from Source

Requirements:

  • Rust 1.70+
  • wasm-pack
# Build WASM package
cd wasm
wasm-pack build --target web

# The output will be in wasm/pkg/

Related Packages

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.