Ignition
Ignition is still in development, things can and will change
Ignition is a powerful CLI tool for building, managing, and running WebAssembly functions using Extism. Think of it as "Docker for WebAssembly functions" - providing a familiar workflow for developers to build, share, and execute WebAssembly modules without the complexity.
Why Ignition?
- Language-agnostic: Build WebAssembly functions in Rust, TypeScript, JavaScript, or Go
- Simple workflow: Familiar commands for building, running, and managing functions
- Local registry: Store and version your functions locally
- Dual execution modes: Run functions via CLI or HTTP API
- Compose support: Define and run multi-function applications with compose files
- Built on standards: Uses Extism PDK for WebAssembly development
Installation
# Install from source
git clone https://github.com/ignitionstack/ignition
cd ignition
go build
Quick Start Guide
1. Start the Ignition Engine
The engine powers the HTTP API and function execution environment:
ignition engine start
The engine can be configured using a YAML file, environment variables, or command-line flags:
# Start with a custom configuration file
ignition engine start --config /path/to/config.yaml
# Show the current configuration
ignition engine start --show-config
# Override specific settings
ignition engine start --socket /tmp/custom-socket.sock --http :9090
Engine Configuration
Ignition uses a flexible configuration system based on:
- Configuration File: Default location is
~/.ignition/config.yaml
- Environment Variables: Use
IGNITION_
prefix (e.g., IGNITION_ENGINE_DEFAULT_TIMEOUT=60s
)
- Command-line Flags: Take highest precedence
Example configuration file:
# Server configuration
server:
socket_path: ~/.ignition/engine.sock
http_addr: :8080
registry_dir: ~/.ignition/registry
# Engine configuration
engine:
default_timeout: 30s
log_store_capacity: 1000
circuit_breaker:
failure_threshold: 5
reset_timeout: 30s
plugin_manager:
ttl: 10m
cleanup_interval: 1m
See the example-config.yaml file for a complete configuration template.
2. Create a New Function
# Creates a new function project (interactive language selection)
ignition init my_function
3. Build Your Function
# Build with namespace/name:tag format
ignition build -t my_namespace/my_function:latest my_function/
4. Execute Your Function
Method 1: Direct CLI Invocation
# Call with optional entrypoint (-e), payload (-p), and config (-c)
ignition call my_namespace/my_function -e greet -p "ignition" -c key=value -c another=value
Method 2: HTTP API
# First, load the function into the engine (optionally with config)
ignition run my_namespace/my_function:latest -c key=value -c another=value
# Then call via HTTP (requires httpie or similar tool)
http POST http://localhost:8080/my_namespace/my_function/greet payload=ignition
Note: The run
command is only needed for HTTP API access. CLI invocation with call
works without it.
Function Development
Configuration (ignition.yml)
Every function requires an ignition.yml
configuration file:
function:
name: my_function
language: rust # rust, typescript, javascript, or go
settings:
enable_wasi: true # Enable WASI capabilities
allowed_urls: # External URLs the function can access
- "https://api.example.com"
Function Configuration
You can pass configuration values to functions at runtime:
# Using the run command
ignition run my_namespace/my_function -c vowels=aeiou -c debug=true
# Using the call command
ignition call my_namespace/my_function -e count_vowels -p "Hello" -c vowels=aeiou
# Using compose (in ignition-compose.yml)
services:
my_service:
function: my_namespace/my_function:latest
config:
vowels: "aeiou"
debug: "true"
These values are accessible within your function via the Extism plugin config mechanism.
Supported Languages
Ignition provides templates for multiple languages:
Language |
Based On |
Rust |
Extism Rust PDK |
TypeScript |
Extism TS PDK |
JavaScript |
Extism JS PDK |
Go |
Extism Go PDK |
Python |
Extism Python PDK |
AssemblyScript |
Extism AssemblyScript PDK |
Each template includes project structure, dependencies, and example code.
Managing Functions
List Functions
# List all functions in a namespace
ignition function ls my_namespace/my_function
# List all running functions
ignition ps
Functions use Docker-like tagging for versioning:
# Build with specific tag
ignition build -t my_namespace/my_function:v1.0.0 my_function/
Using Compose
WARNING: This feature is still in active development so some things might not work or not be implemented yet
Ignition supports a Docker Compose-like workflow for running multiple functions together.
Initialize a Compose File
# Create a new ignition-compose.yml file
ignition compose init
Define Your Services
Edit the generated ignition-compose.yml
file:
version: "1"
services:
api:
function: my_namespace/api_service:latest
config:
debug: "true"
greeting: "hallo"
processor:
function: my_namespace/processor:v1.2.0
depends_on:
- api
worker:
function: my_namespace/worker:latest
Start Services
# Load and run all functions defined in ignition-compose.yml
ignition compose up
# Use a different compose file
ignition compose up -f my-compose.yml
# Run in detached mode
ignition compose up -d
Check Running Functions
# List all running functions
ignition ps
Stop Services
# Stop all functions defined in ignition-compose.yml
ignition compose down
HTTP API Reference
When functions are loaded with ignition run
, they're accessible via HTTP:
http://localhost:8080/{namespace}/{function}/{endpoint}
Example Request:
http POST http://localhost:8080/my_namespace/my_function/greet payload=ignition
Development Status
Ignition is under active development. APIs and features may change. We welcome your feedback and contributions!
Resources
Similar Projects
- Extism - The Extensible Plugin System
- WASI - The WebAssembly System Interface
- Spin - WebAssembly microservices framework
License
MIT License - see LICENSE for details.