oxmpl-js
JavaScript/WASM bindings for the OxMPL Rust library.
Installation
Note: This package is not yet published to npm. To use it, you'll need to include it as a Git submodule or clone the repository directly.
Building
Prerequisites
- Node.js (v22 or later recommended)
- Rust toolchain with
wasm32-unknown-unknowntarget - wasm-pack (installed automatically via npm)
Commands
# Install dependencies and build WASM module
# Build only
# Run tests
# Create a packaged version
The build process uses wasm-pack to:
- compile the Rust code to WebAssembly
- generate TypeScript definitions and JS glue
- output a fully-formed JS package in
pkg-bundler/
Usage
This example assumes that you've installed the package as a dependency called oxmpl-js.
import * as oxmpl from 'oxmpl-js';
// Create a 2D state space
const space = ;
// Define start and goal
const start = ;
const goal = ;
// Create problem definition
const problem = ;
// Define validity checker
const validityChecker = ;
// Create and run planner
const planner = ;
planner.;
const path = planner.;
License
BSD-3-Clause License. See the main project LICENSE file for details.