Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rift
High-performance Mountebank-compatible HTTP/HTTPS mock server written in Rust
Rift is a high-performance, Mountebank-compatible mock server that delivers 2-250x better performance. Use your existing Mountebank configurations and enjoy faster test execution.
Documentation | Quick Start | Examples
Why Rift?
Mountebank Compatible
- Same REST API - Works with existing Mountebank clients and tooling
- Same Configuration - Load your
imposters.jsonwithout changes - Same Behavior - Predicates, responses, behaviors all work identically
Blazing Fast Performance
| Feature | Mountebank | Rift | Speedup |
|---|---|---|---|
| Simple stubs | 1,900 RPS | 39,000 RPS | 20x faster |
| JSONPath predicates | 107 RPS | 26,500 RPS | 247x faster |
| XPath predicates | 169 RPS | 28,700 RPS | 170x faster |
| Complex predicates | 900 RPS | 29,300 RPS | 32x faster |
Full Feature Support
- Imposters - HTTP/HTTPS mock servers
- Predicates - equals, contains, matches, exists, jsonpath, xpath, and, or, not
- Responses - Static, proxy, injection
- Behaviors - wait, decorate, copy, lookup
- Proxy Mode - Record and replay
Quick Start
Run with Docker
# Pull and run (from GitHub Container Registry)
# Or from Docker Hub
# Create your first imposter
# Test it
Use Existing Mountebank Config
# Load your existing imposters.json
Installation
Docker (Recommended)
# GitHub Container Registry (recommended)
# Or Docker Hub
Homebrew (macOS/Linux)
Cargo (crates.io)
Download Binary
Download pre-built binaries from GitHub Releases:
# Example for Linux x86_64
Available platforms:
- Linux:
x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu,x86_64-unknown-linux-musl,aarch64-unknown-linux-musl - macOS:
x86_64-apple-darwin,aarch64-apple-darwin - Windows:
x86_64-pc-windows-msvc
Build from Source
Node.js / npm
For Node.js projects, use the official npm package:
import rift from '@rift-vs/rift';
const server = await rift.;
// Create imposters, run tests...
await server.;
Documentation
Getting Started
- Installation - Docker, binary, build from source
- Quick Start - Create your first imposter
- Node.js Integration - npm package for Node.js
- Migration Guide - Using Rift with Mountebank configs
Mountebank Compatibility
- Imposters - Mock server configuration
- Predicates - Request matching
- Responses - Response configuration
- Behaviors - wait, decorate, copy
- Proxy Mode - Record and replay
Configuration
- Mountebank Format - JSON configuration
- Native Rift Format - YAML for advanced features
- CLI Reference - Command-line options
Features
- Fault Injection - Chaos engineering
- Scripting - Rhai, Lua, JavaScript
- TLS/HTTPS - Secure connections
- Metrics - Prometheus integration
- TUI - Interactive terminal interface
Deployment
- Docker - Container deployment
- Kubernetes - K8s patterns
Reference
- REST API - Admin API reference
- Performance - Benchmarks
Example
More examples in examples/.
Metrics
Prometheus metrics on :9090/metrics:
Metrics include request counts, latency histograms, fault injection stats, and more.
CLI Tools
Rift includes additional command-line tools. All tools are included when you install via Homebrew or download release binaries.
rift-tui - Interactive Terminal UI
Manage imposters and stubs through an interactive terminal interface:
# If installed via Homebrew or release binary
# Connect to a different admin URL
Features:
- View and manage imposters with vim-style navigation (j/k)
- Create, edit, and delete stubs with JSON editor
- Generate curl commands for testing stubs
- Import/export imposter configurations
- Search and filter imposters and stubs
- Real-time metrics dashboard
rift-verify - Stub Verification
Automatically test your imposters by generating requests from predicates:
rift-lint - Configuration Linter
Validate imposter configuration files before loading:
# If installed via Homebrew or release binary
# Via Docker (for CI/CD)
# Via cargo
Development
# Build
# Run tests
# Run with debug logging
RUST_LOG=debug
# Run benchmarks
&&
Contributing
Contributions welcome! Please read our contributing guidelines and submit PRs.
License
Apache License 2.0 - see LICENSE for details.
Acknowledgments
- Mountebank - The original service virtualization tool that inspired Rift's API
- Tokio - Async runtime for Rust
- Hyper - HTTP library for Rust