#Why Flexible Edges? โ€” Integrate, Don't Isolate

Version: 0.33.0 Updated: 2026-03-15 Applies to: ranvier (all crates) Category: Philosophy & Architecture


While the core is opinionated, Ranvier embraces the Rust ecosystem at its boundaries. "Flexible Edges" means you can use any Rust library, framework, or pattern at the integration points.

#1. Ecosystem Integration: Standing on Giants' Shoulders

If Ranvier enforced its paradigm everywhere, you'd need "Ranvier-specific" versions of every tool. This is unsustainable and isolates Ranvier from the broader Rust community.

Compatible ecosystem tools:

  • HTTP: Hyper 1.0, Tower, actix-web, Axum, warp
  • Database: sqlx, diesel, sea-orm, mongodb
  • Caching: redis, memcached, in-memory
  • Metrics: Prometheus, OpenTelemetry, statsd
  • Tracing: tracing, log, slog
  • Async runtime: tokio, async-std, smol (Ranvier is runtime-agnostic)

#Benefits

  • Reuse existing knowledge: If your team knows Tower, use Tower layers
  • Leverage battle-tested code: Tower's CORS/Trace/Timeout are production-hardened
  • Stay current: When tower-http releases a new version, upgrade immediately

#2. Gradual Migration: From X to Ranvier, Step by Step

"All or nothing" frameworks are risky. Rewriting a production app from scratch is expensive and dangerous. Ranvier allows incremental adoption.

Phase Action Risk
Week 1 Keep existing Tower layers, replace one handler with Ranvier Transition Minimal
Week 2 Replace more handlers, keep Tower infrastructure Low
Week 3 Start converting Tower middleware to Transitions (if desired) Controlled
Result Production-proven incremental migration, rollback if needed โ€”

#3. User Autonomy: You Know Your Constraints Best

Framework authors can't predict every use case. Rigid frameworks force workarounds when your needs diverge from the "happy path."

Ranvier's philosophy: We're opinionated about what (use Transitions for business logic), not how (you choose HTTP server, DB, deployment).

  • HTTP Server: Use ranvier-http (Hyper-based) or integrate into your Axum app
  • Database: Write a Transition that uses your DB library (sqlx, diesel, etc.)
  • Deployment: Deploy as binary, container, Lambda โ€” Ranvier is just Rust code

Sweet spot: Opinionated where it matters (paradigm), flexible where it doesn't (infrastructure).


  • Why Opinionated Core? โ€” The other side of the coin
  • Boundary Map โ€” Where core ends and edges begin
  • PHILOSOPHY.md โ€” Detailed patterns and migration paths