DEV Community

Abhijith MS
Abhijith MS

Posted on

πŸ”₯ Meet Chimera: The Fastest Way to Spin Up a Mock API (with Rust power)

Quickly spin up mock HTTP/WebSocket APIs using Chimera, a blazing-fast mock server built with Rust

⚑ What is Chimera?

Chimera is a high-performance, configurable mock server built in Rust with Axum. It allows developers to serve JSON or CSV files as fully functional mock APIs via HTTP or WebSockets.

Ideal for:

  • Frontend / mobile API development
  • IoT simulations
  • Prototyping microservices
  • and much more

πŸš€ Features

  • Serve mock HTTP + WebSocket endpoints
  • Full CRUD support (GET, POST, PUT, PATCH, DELETE)
  • Auto data generation from schema files
  • CORS control, form submission, simulated latency
  • Ultra-fast startup, built in Rust πŸ¦€

πŸ“¦ Install Chimera

Install via Cargo:

cargo install chimera-cli
Enter fullscreen mode Exit fullscreen mode

Or download prebuilt binaries from the GitHub Releases page.

πŸ› οΈ Start a Mock Server in Seconds

1. Create a data.json file:

{
  "products": [
    { "id": 1, "name": "Potion of Healing" },
    { "id": 2, "name": "Invisibility Cloak" }
  ]
}
Enter fullscreen mode Exit fullscreen mode

2. Start the HTTP Server

chimera-cli --path data.json http
Enter fullscreen mode Exit fullscreen mode

Now visit http://localhost:8080/products to see your mock API in action πŸš€

βš™οΈ Extra CLI Options

  • --port 4000: Custom port
  • --latency 100: Simulate 100ms latency
  • --sort products desc id: Sort records
  • --page 5: Paginate with 5 records per page
  • --cors: Enable CORS via chimera.cors
  • -X: Enable auto data generation via schema

πŸ“š Docs & Links


Let me know what features you'd like to see next: gRPC, GraphQL, MQTT? Feedback is welcome!

Top comments (0)