Skip to content

Commit 45a5e0d

Browse files
feat: re-export service framework crates (#1956)
* feat: re-export supported framework crates * fix: honor feature flagged framework version * fmt --------- Co-authored-by: jonaro00 <[email protected]>
1 parent 5e5a2ac commit 45a5e0d

File tree

10 files changed

+28
-1
lines changed

10 files changed

+28
-1
lines changed

services/shuttle-actix-web/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![doc = include_str!("../README.md")]
22
use std::net::SocketAddr;
33

4+
pub use actix_web;
5+
46
/// A wrapper type for a closure that returns an [actix_web::web::ServiceConfig] so we can implement
57
/// [shuttle_runtime::Service] for it.
68
#[derive(Clone)]

services/shuttle-axum/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
use shuttle_runtime::{CustomError, Error};
33
use std::net::SocketAddr;
44

5+
#[cfg(feature = "axum")]
6+
pub use axum;
7+
#[cfg(feature = "axum-0-7")]
8+
pub use axum_0_7 as axum;
9+
510
#[cfg(feature = "axum")]
611
use axum::Router;
712
#[cfg(feature = "axum-0-7")]

services/shuttle-poem/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#![doc = include_str!("../README.md")]
2+
3+
pub use poem;
4+
25
/// A wrapper type for [poem::Endpoint] so we can implement [shuttle_runtime::Service] for it.
36
pub struct PoemService<T>(pub T);
47

services/shuttle-rocket/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![doc = include_str!("../README.md")]
22
use std::net::SocketAddr;
33

4+
pub use rocket;
5+
46
/// A wrapper type for [rocket::Rocket<rocket::Build>] so we can implement [shuttle_runtime::Service] for it.
57
pub struct RocketService(pub rocket::Rocket<rocket::Build>);
68

services/shuttle-salvo/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use salvo::Listener;
33
use shuttle_runtime::Error;
44
use std::net::SocketAddr;
55

6+
pub use salvo;
7+
68
/// A wrapper type for [salvo::Router] so we can implement [shuttle_runtime::Service] for it.
79
pub struct SalvoService(pub salvo::Router);
810

services/shuttle-serenity/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ use serenity::Client;
77
#[cfg(feature = "serenity-0-11")]
88
use serenity_0_11::Client;
99

10+
#[cfg(feature = "serenity")]
11+
pub use serenity;
12+
#[cfg(feature = "serenity-0-11")]
13+
pub use serenity_0_11 as serenity;
14+
1015
/// A wrapper type for [serenity::Client] so we can implement [shuttle_runtime::Service] for it.
1116
pub struct SerenityService(pub Client);
1217

services/shuttle-thruster/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
use shuttle_runtime::Error;
33
use std::net::SocketAddr;
44

5+
pub use thruster;
6+
57
/// A wrapper type for [thruster::ThrusterServer] so we can implement [shuttle_runtime::Service] for it.
68
pub struct ThrusterService<T>(pub T);
79

services/shuttle-tide/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
use shuttle_runtime::{CustomError, Error};
33
use std::net::SocketAddr;
44

5-
/// A wrapper type for [tide::Server<T] so we can implement [shuttle_runtime::Service] for it.
5+
pub use tide;
6+
7+
/// A wrapper type for [tide::Server<T>] so we can implement [shuttle_runtime::Service] for it.
68
pub struct TideService<T>(pub tide::Server<T>);
79

810
#[shuttle_runtime::async_trait]

services/shuttle-tower/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
use shuttle_runtime::{CustomError, Error};
33
use std::net::SocketAddr;
44

5+
pub use tower;
6+
57
/// A wrapper type for [tower::Service] so we can implement [shuttle_runtime::Service] for it.
68
pub struct TowerService<T>(pub T);
79

services/shuttle-warp/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use shuttle_runtime::Error;
33
use std::net::SocketAddr;
44
use std::ops::Deref;
55

6+
pub use warp;
7+
68
/// A wrapper type for [warp::Filter] so we can implement [shuttle_runtime::Service] for it.
79
pub struct WarpService<T>(pub T);
810

0 commit comments

Comments
 (0)