Skip to content

Introduction ​

Sword is a structured and opinionated framework for building server-side applications through different transports or protocols. The idea is to provide a common abstraction layer for applications, that is, a transport-agnostic system for building scalable applications under unified development patterns.

Motivation ​

Building scalable web applications requires organizing the code into well-defined layers and maintaining a clear separation of responsibilities.

Axum, the web framework from the tokio team, offers a broad set of features for web development. However, as a project grows, the code can become hard to maintain, and it becomes common to add pieces to extend or simplify Axum's features, which can end up in a codebase that is hard to sustain. This problem also applies to gRPC applications and other transports.

For this reason, Sword builds on libraries from the tokio ecosystem to provide a more organized and modular development structure, with the goal of making server-side applications easier to scale and maintain.

Alternatives ​

Sword is not the only option in this area, so a comparison table between similar alternatives is included.
See the comparison table