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

@stuartwhite/cre-sdk-javy-plugin

v1.0.3

Published

Chainlink CRE SDK Javy Plugin.

Readme

@chainlink/cre-sdk-javy-plugin

WebAssembly compilation tools for Chainlink CRE SDK workflows using Javy.

This package enables compiling TypeScript/JavaScript workflows to WebAssembly for execution in the Chainlink Runtime Environment. It provides the Javy plugin that exposes CRE host functions to guest workflows.

Installation

bun add @chainlink/cre-sdk-javy-plugin

Quick Start

Note: Most users will use the main @chainlink/cre-sdk package which includes compilation tools.

# Install the main SDK (includes this package)
bun add @chainlink/cre-sdk

# One-time setup: download Javy binary and compile plugin
bunx cre-setup

# Compile your workflow to WebAssembly
bunx cre-compile src/workflow.ts dist/workflow.wasm

Usage

Standalone Usage

If using this package directly (without the main SDK):

  1. Install the package

    bun add @chainlink/cre-sdk-javy-plugin
  2. Setup (one-time)

    bunx cre-setup

    This downloads the appropriate Javy binary for your OS and compiles the CRE plugin.

  3. Compile workflows

    bunx cre-compile-workflow <input.js> <output.wasm>

Example

# With main SDK (typical usage)
bunx cre-compile src/hello-world.ts dist/hello-world.wasm

# Standalone (using this package directly)
bunx cre-compile-workflow src/hello-world.js dist/hello-world.wasm

Javy Setup & Troubleshooting

macOS

The repo includes pre-compiled Javy binaries. If you encounter Apple security issues:

# Remove quarantine attribute
xattr -d com.apple.quarantine ./bin/javy-arm-macos-v5.0.4

# Make executable
chmod +x ./bin/javy-arm-macos-v5.0.4

# Verify installation
./bin/javy-arm-macos-v5.0.4 --version

Linux

# Make executable
chmod +x ./bin/javy-arm-linux-v5.0.4

# Verify installation
./bin/javy-arm-linux-v5.0.4 --version

Plugin Architecture

The Javy Chainlink SDK plugin exposes host functions to guest workflows:

  • Static Linking: Plugin is compiled into the final WASM (current approach)
  • Dynamic Loading: Runtime plugin discovery (future enhancement)

Build from Source

Prerequisites

  • Rust toolchain with wasm32-wasip1 target
  • Bun >= 1.2.21
# Install Rust WASM target
rustup target add wasm32-wasip1

# Install wasm-tools for debugging
cargo install --locked wasm-tools

Building

# Build the plugin
bun run build

# Or manually build the Rust plugin
cd src/javy_chainlink_sdk
cargo build --target wasm32-wasip1 --release

Build Output

After building, you'll find:

  • dist/javy_chainlink_sdk.wasm - The compiled plugin
  • dist/workflow.wit - WebAssembly Interface Types definitions

Debugging Compiled WASM

Use wasm-tools to inspect compiled workflows:

# Validate a compiled workflow
wasm-tools component targets --world workflow src/workflow.wit dist/workflow.wasm

# Print WASM structure
wasm-tools print dist/workflow.wasm

Configuration

The plugin uses these configuration files:

  • src/javy_chainlink_sdk/Cargo.toml - Rust dependencies and build config
  • src/workflow.wit - WebAssembly Interface Types for CRE workflows
  • bin/compile-workflow.ts - Workflow compilation logic
  • bin/setup.ts - One-time setup script

Compatibility

  • Javy Version: v5.0.4
  • Rust Edition: 2021
  • WASM Target: wasm32-wasip1
  • Node Runtime: Bun >= 1.2.21

Development

Project Structure

src/
├── javy_chainlink_sdk/     # Rust plugin source
│   ├── src/lib.rs         # Plugin implementation
│   └── Cargo.toml         # Rust dependencies
├── workflow.wit           # WASM interface definitions
bin/
├── setup.ts              # Setup script
└── compile-workflow.ts   # Compilation script

Testing

# Run plugin tests
cd src/javy_chainlink_sdk
cargo test

# Test compilation with example workflow (requires @chainlink/cre-sdk installed)
bunx cre-compile examples/hello-world.ts test-output.wasm

# Or with standalone binary
bunx cre-compile-workflow examples/hello-world.js test-output.wasm

Contributing

  1. Make changes to the Rust plugin in src/javy_chainlink_sdk/
  2. Build and test: bun run build
  3. Test compilation: bunx cre-compile <test-file> <output> or bunx cre-compile-workflow <test-file> <output>
  4. Verify WASM output via simulating with CRE CLI.

License

See LICENSE in LICENSE.md