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

@cooljapan/oxilean

v0.1.1

Published

OxiLean - Lean4-compatible proof assistant for JavaScript/TypeScript

Downloads

161

Readme

oxilean-wasm

Crates.io Docs.rs npm

WebAssembly Bindings for the OxiLean Theorem Prover

oxilean-wasm exposes the OxiLean type checker and proof engine as a WebAssembly module that can be loaded directly in web browsers or Node.js environments. It provides a JavaScript/TypeScript-friendly API so that web applications, online proof assistants, and editor extensions can drive OxiLean without any server-side infrastructure.

The npm package is published as @cooljapan/oxilean.

Part of the OxiLean project -- a Lean-compatible theorem prover implemented in pure Rust.

Install

npm install @cooljapan/oxilean

Modules

| Module | Description | |--------|-------------| | api | Core OxiLean API (platform-independent logic) | | types | Value types, result structs, and conversion helpers | | error | WASM-compatible error type | | wasm_api | #[wasm_bindgen] entry points for JavaScript (requires wasm feature) |

Feature Flags

| Feature | Enables | |---------|---------| | wasm | wasm-bindgen, serde, serde_json, serde-wasm-bindgen, js-sys |

API

The wasm_api module exports the WasmOxiLean class and convenience functions:

import { WasmOxiLean, checkSource, getVersion } from '@cooljapan/oxilean';

const ox = new WasmOxiLean();

// Check source code
const result = ox.check('theorem foo : True := trivial');
// result: { success: boolean, declarations: DeclInfo[], errors: ErrorInfo[], warnings: WarningInfo[] }

// REPL
const repl = ox.repl('#check Nat');
// repl: { output: string, goals: GoalInfo[], success: boolean, error?: string }

// Completions at a position
const completions = ox.completions(source, line, col);
// completions: CompletionItem[]

// Hover info at a position
const hover = ox.hoverInfo(source, line, col); // string | null

// Format source code
const formatted = ox.format(source); // string

// Properties
ox.sessionId;       // getter -- unique session identifier
ox.history();       // string[] -- REPL command history
ox.clearHistory();  // clear REPL history
WasmOxiLean.version(); // static -- OxiLean version string

// Convenience functions (no instance needed)
checkSource('theorem foo : True := trivial');
getVersion();

// Clean up WASM memory when done
ox.free();

Building

The build script produces three targets: bundler (webpack/vite), web (browser direct), and nodejs.

# From the crate directory
bash build-wasm.sh

This creates:

  • pkg/ -- bundler target (primary)
  • pkg-web/ -- web target
  • pkg-nodejs/ -- nodejs target

Dependencies

All dependencies are optional and gated behind the wasm feature:

  • wasm-bindgen 0.2.114
  • serde + serde_json
  • serde-wasm-bindgen 0.6.5
  • js-sys 0.3.83

Testing

# Unit tests (native target)
cargo test -p oxilean-wasm

# WASM tests in headless browser (requires wasm-pack)
wasm-pack test crates/oxilean-wasm --headless --chrome

License

Copyright COOLJAPAN OU (Team Kitasan). Apache-2.0 -- See LICENSE for details.