Philosophy / Why Flexible Edges?

Integrate, Don't Isolate

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.

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

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.

Week 1: Keep existing Tower layers, replace one handler with Ranvier Transition
Week 2: Replace more handlers, keep Tower infrastructure
Week 3: Start converting Tower middleware to Transitions (if desired)
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).
For detailed patterns and migration paths, see PHILOSOPHY.md — Why Flexible Edges?