Dumpling
A fast JavaScript runtime and bundler implemented in Rust.
Features
- 🚀 Fast JavaScript runtime using the Boa engine
- 📦 Package manager functionality
- 📦 Module bundling with support for ES modules, CommonJS, and IIFE formats
- 🔥 Hot module replacement in development mode
- 📁 Advanced module resolution with support for node_modules
- ⚡ Built with Rust for performance and safety
Installation
Usage
Initialize a new project
This creates a new project with:
package.jsonwith basic scriptssrc/index.jsas the entry pointdist/directory for build outputs
Run a JavaScript file
Start development server
Bundle your code
# ES modules format (default)
# CommonJS format
# IIFE format with minification
# With source map
Install packages
# Install a package (fetches from npm registry)
# Install as dev dependency
# Install all dependencies from package.json
Run package.json scripts
Configuration
Dumpling uses a package.json file for configuration:
Module Resolution
Dumpling supports modern JavaScript module resolution:
// Relative imports
import utils from "./utils.js";
import helper from "../helper.js";
// Node modules imports
import _ from "lodash";
import express from "express";
// Dynamic imports
const module = await import;
// JSON imports
const data = require;
Development
# Clone the repository
# Build
# Run tests
# Run in development mode
License
MIT