Application Types
Sword distinguishes between two types of applications to suit your needs.
Web Application
The Web App is based on Axum and is built using these feature flags:
web: Enables HTTP controllers. Requires importingsword::web::*.socketio: Enables real-time controllers. Requires importingsword::socketio::*.
You can choose one or both, depending on whether you want to build a traditional web application or a real-time application with Socket.IO.
INFO
Since socketioxide is a complement of axum, the web feature flag is automatically enabled when socketio is enabled.
Complements
A web application can be complemented with these feature flags:
multipart: Enables support formultipart/form-datain HTTP controllers.validation-validator: Enables validation of input data in web and socketio controllers.
gRPC Application
The gRPC application is based on tonic and is built using these feature flags:
grpc: Enables gRPC controllers based ontonic. Requires importingsword::grpc::*.
Complements
A gRPC application can be complemented with these feature flags:
grpc-reflection(Optional): Enables gRPC reflection. (Enable gRPC service introspection for clients like grpcurl).

