Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename api feature to server-api #178

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
override: true
- name: Build and run tests
run: cargo test --all-features
- name: Run tests on minimal feature set
run: cargo test --no-default-features

integration:
name: Integration tests
Expand Down
32 changes: 30 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ postgres-types = { version = "0.2", features = [
chrono = { version = "0.4", features = ["std"], optional = true }

[features]
default = ["api"]
api = [
default = ["server-api"]
server-api = [
"dep:tokio",
"dep:tokio-util",
"dep:tokio-rustls",
Expand Down Expand Up @@ -80,3 +80,31 @@ members = [
"tests-integration/rust-client",
"tests-integration/test-server"
]

[[example]]
name = "server"
required-features = ["server-api"]

[[example]]
name = "secure_server"
required-features = ["server-api"]

[[example]]
name = "bench"
required-features = ["server-api"]

[[example]]
name = "gluesql"
required-features = ["server-api"]

[[example]]
name = "sqlite"
required-features = ["server-api"]

[[example]]
name = "duckdb"
required-features = ["server-api"]

[[example]]
name = "scram"
required-features = ["server-api"]
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
extern crate derive_new;

/// handler layer and high-level API layer.
#[cfg(feature = "api")]
#[cfg(feature = "server-api")]
pub mod api;
/// error types.
pub mod error;
/// the protocol layer.
pub mod messages;
/// server entry-point for tokio based application.
#[cfg(feature = "api")]
#[cfg(feature = "server-api")]
pub mod tokio;
/// types and encoding related helper
#[cfg(feature = "api")]
#[cfg(feature = "server-api")]
pub mod types;
Loading