Skip to content

Commit

Permalink
chore: refactor server into server crate
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Zak <[email protected]>
  • Loading branch information
rjzak committed Dec 13, 2022
1 parent b9eb05f commit f0a013f
Show file tree
Hide file tree
Showing 7 changed files with 1,141 additions and 1,130 deletions.
38 changes: 21 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 2 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,40 +11,18 @@ license = "AGPL-3.0"

[dependencies]
attestation = { path = "crates/attestation", features = ["sgx", "snp"] }
steward-server = { path = "crates/server" }
anyhow = { version = "^1.0.66", default-features = false }
axum = { version = "^0.5.17", features = ["headers"], default-features = false }
base64 = { version = "^0.20.0", default-features = false }
clap = { version = "^4.0.29", features = ["help", "usage", "error-context", "std", "derive", "env"], default-features = false }
confargs = { version = "^0.1.3", default-features = false }
const-oid = { version = "0.9.1", features = ["db"], default-features = false }
der = { version = "0.6", features = ["std"], default-features = false }
flagset = { version = "0.4.3", default-features = false}
hyper = { git = "https://github.com/rjzak/hyper", branch = "wasi_wip", features = ["http1", "server"], default-features = false }
mime = { version = "^0.3.16", default-features = false }
rustls-pemfile = {version = "1.0.1", default-features = false }
sec1 = { version = "0.3", features = ["std", "pkcs8"], default-features = false }
serde = { version = "1.0", features = ["derive"], default-features = false }
tokio = { version = "^1.23.0", features = ["rt", "macros"], default-features = false }
toml = { version = "0.5", default-features = false }
tower-http = { version = "^0.3.5", features = ["trace"], default-features = false }
tracing-subscriber = { version="^0.3.15", features = ["env-filter", "json", "fmt"], default-features = false }
tracing = { version = "^0.1.29", default-features = false }
uuid = { version = "^1.2.2", features = ["v4"], default-features = false }
x509 = { version = "0.1", features = ["std"], package = "x509-cert", default-features = false }
zeroize = { version = "^1.5.2", features = ["alloc"], default-features = false }

[target.'cfg(not(target_os = "wasi"))'.dependencies]
tokio = { version = "^1.23.0", features = ["rt-multi-thread", "macros"], default-features = false }

[dev-dependencies]
axum = { version = "^0.5.17", default-features = false }
http = { version = "^0.2.6", default-features = false }
memoffset = { version = "0.7.1", default-features = false }
rstest = { version = "0.16", default-features = false }
sgx = { version = "0.6.0", default-features = false }
tower = { version = "^0.4.11", features = ["util"], default-features = false }
testaso = { version = "0.1", default-features = false }

[profile.release]
incremental = false
codegen-units = 1
Expand All @@ -55,4 +33,5 @@ strip = true
resolver = '2'
members = [
'crates/attestation',
'crates/server',
]
3 changes: 2 additions & 1 deletion crates/attestation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ pub mod sgx;
#[cfg(feature = "snp")]
pub mod snp;

use serde::{Deserialize, Deserializer};
use std::borrow::Borrow;
use std::collections::HashSet;
use std::fmt::{Display, Formatter};
use std::ops::Deref;

use serde::{Deserialize, Deserializer};

/// Digest generic in hash size `N`
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
pub struct Digest<const N: usize>(pub [u8; N]);
Expand Down
34 changes: 34 additions & 0 deletions crates/server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "steward-server"
version = "0.2.0"
edition = "2021"
license = "AGPL-3.0"
description = "Server library for Steward"

[dependencies]
attestation = { path = "../../crates/attestation", features = ["sgx", "snp"] }
anyhow = { version = "^1.0.66", default-features = false }
axum = { version = "^0.5.17", features = ["headers"], default-features = false }
const-oid = { version = "0.9.1", features = ["db"], default-features = false }
der = { version = "0.6", features = ["std"], default-features = false }
hyper = { git = "https://github.com/rjzak/hyper", branch = "wasi_wip", features = ["http1", "server"], default-features = false }
rustls-pemfile = {version = "1.0.1", default-features = false }
sec1 = { version = "0.3", features = ["std", "pkcs8"], default-features = false }
serde = { version = "1.0", features = ["derive"], default-features = false }
tokio = { version = "^1.23.0", features = ["rt", "macros"], default-features = false }
toml = { version = "0.5", default-features = false }
tower-http = { version = "^0.3.5", features = ["trace"], default-features = false }
tracing = { version = "^0.1.29", default-features = false }
tracing-subscriber = { version="^0.3.15", features = ["env-filter", "json", "fmt"], default-features = false }
uuid = { version = "^1.2.2", features = ["v4"], default-features = false }
x509 = { version = "0.1", features = ["std"], package = "x509-cert", default-features = false }
zeroize = { version = "^1.5.2", features = ["alloc"], default-features = false }

[dev-dependencies]
axum = { version = "^0.5.17", default-features = false }
http = { version = "^0.2.6", default-features = false }
memoffset = { version = "0.7.1", default-features = false }
rstest = { version = "0.16", default-features = false }
sgx = { version = "0.6.0", default-features = false }
tower = { version = "^0.4.11", features = ["util"], default-features = false }
testaso = { version = "0.1", default-features = false }
File renamed without changes.
Loading

0 comments on commit f0a013f

Please sign in to comment.