From baaaec75cbe8215aaccf1575ede6ea0a805cac6c Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Sun, 29 Sep 2024 21:24:32 -0400 Subject: [PATCH] reorganize repo (#4) --- Cargo.lock | 2 +- Cargo.toml | 11 ++++++----- {crates/did-simple => did-simple}/Cargo.toml | 0 {crates/did-simple => did-simple}/README.md | 0 .../did-simple => did-simple}/src/crypto/ed25519.rs | 0 {crates/did-simple => did-simple}/src/crypto/mod.rs | 0 {crates/did-simple => did-simple}/src/key_algos.rs | 0 {crates/did-simple => did-simple}/src/lib.rs | 0 {crates/did-simple => did-simple}/src/methods/key.rs | 0 {crates/did-simple => did-simple}/src/methods/mod.rs | 0 {crates/did-simple => did-simple}/src/methods/web.rs | 0 {crates/did-simple => did-simple}/src/url.rs | 0 {crates/did-simple => did-simple}/src/utf8bytes.rs | 0 {crates/did-simple => did-simple}/src/varint.rs | 0 {crates/header-parsing => header-parsing}/Cargo.toml | 0 {crates/header-parsing => header-parsing}/src/lib.rs | 0 {apps/identity_server => identity-server}/Cargo.toml | 2 +- {apps/identity_server => identity-server}/build.rs | 0 .../fixtures/README.md | 0 .../fixtures/sample_users.sql | 0 .../migrations/20240812062115_users.down.sql | 0 .../migrations/20240812062115_users.up.sql | 0 .../migrations/README.md | 0 {apps/identity_server => identity-server}/src/jwk.rs | 0 .../src/jwks_provider.rs | 1 + {apps/identity_server => identity-server}/src/lib.rs | 0 {apps/identity_server => identity-server}/src/main.rs | 0 .../identity_server => identity-server}/src/oauth.rs | 0 {apps/identity_server => identity-server}/src/uuid.rs | 0 .../identity_server => identity-server}/src/v1/mod.rs | 0 rust-toolchain.toml | 2 +- 31 files changed, 10 insertions(+), 8 deletions(-) rename {crates/did-simple => did-simple}/Cargo.toml (100%) rename {crates/did-simple => did-simple}/README.md (100%) rename {crates/did-simple => did-simple}/src/crypto/ed25519.rs (100%) rename {crates/did-simple => did-simple}/src/crypto/mod.rs (100%) rename {crates/did-simple => did-simple}/src/key_algos.rs (100%) rename {crates/did-simple => did-simple}/src/lib.rs (100%) rename {crates/did-simple => did-simple}/src/methods/key.rs (100%) rename {crates/did-simple => did-simple}/src/methods/mod.rs (100%) rename {crates/did-simple => did-simple}/src/methods/web.rs (100%) rename {crates/did-simple => did-simple}/src/url.rs (100%) rename {crates/did-simple => did-simple}/src/utf8bytes.rs (100%) rename {crates/did-simple => did-simple}/src/varint.rs (100%) rename {crates/header-parsing => header-parsing}/Cargo.toml (100%) rename {crates/header-parsing => header-parsing}/src/lib.rs (100%) rename {apps/identity_server => identity-server}/Cargo.toml (98%) rename {apps/identity_server => identity-server}/build.rs (100%) rename {apps/identity_server => identity-server}/fixtures/README.md (100%) rename {apps/identity_server => identity-server}/fixtures/sample_users.sql (100%) rename {apps/identity_server => identity-server}/migrations/20240812062115_users.down.sql (100%) rename {apps/identity_server => identity-server}/migrations/20240812062115_users.up.sql (100%) rename {apps/identity_server => identity-server}/migrations/README.md (100%) rename {apps/identity_server => identity-server}/src/jwk.rs (100%) rename {apps/identity_server => identity-server}/src/jwks_provider.rs (99%) rename {apps/identity_server => identity-server}/src/lib.rs (100%) rename {apps/identity_server => identity-server}/src/main.rs (100%) rename {apps/identity_server => identity-server}/src/oauth.rs (100%) rename {apps/identity_server => identity-server}/src/uuid.rs (100%) rename {apps/identity_server => identity-server}/src/v1/mod.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index d4d0d3d..672af0c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1103,7 +1103,7 @@ dependencies = [ ] [[package]] -name = "identity_server" +name = "identity-server" version = "0.0.0" dependencies = [ "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 9310dec..61c7ea3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,9 @@ [workspace] resolver = "2" members = [ - "apps/identity_server", - "crates/did-simple", + "did-simple", + "header-parsing", + "identity-server", ] # These settings will apply to all members of the workspace that opt in to them @@ -11,7 +12,7 @@ version = "0.0.0" license = "MIT-0 OR Apache-2.0" repository = "https://github.com/NexusSocial/identity" edition = "2021" -rust-version = "1.78.0" +rust-version = "1.81.0" [workspace.dependencies] arc-swap = "1.7.1" @@ -21,9 +22,9 @@ axum-macros = "0.4.1" base64 = "0.21.7" clap = { version = "4.4.11", features = ["derive"] } color-eyre = "0.6" -did-simple.path = "crates/did-simple" +did-simple.path = "did-simple" eyre = "0.6" -header-parsing.path = "crates/header-parsing" +header-parsing.path = "header-parsing" hex-literal = "0.4.1" http = "1.1.0" http-body-util = "0.1.2" diff --git a/crates/did-simple/Cargo.toml b/did-simple/Cargo.toml similarity index 100% rename from crates/did-simple/Cargo.toml rename to did-simple/Cargo.toml diff --git a/crates/did-simple/README.md b/did-simple/README.md similarity index 100% rename from crates/did-simple/README.md rename to did-simple/README.md diff --git a/crates/did-simple/src/crypto/ed25519.rs b/did-simple/src/crypto/ed25519.rs similarity index 100% rename from crates/did-simple/src/crypto/ed25519.rs rename to did-simple/src/crypto/ed25519.rs diff --git a/crates/did-simple/src/crypto/mod.rs b/did-simple/src/crypto/mod.rs similarity index 100% rename from crates/did-simple/src/crypto/mod.rs rename to did-simple/src/crypto/mod.rs diff --git a/crates/did-simple/src/key_algos.rs b/did-simple/src/key_algos.rs similarity index 100% rename from crates/did-simple/src/key_algos.rs rename to did-simple/src/key_algos.rs diff --git a/crates/did-simple/src/lib.rs b/did-simple/src/lib.rs similarity index 100% rename from crates/did-simple/src/lib.rs rename to did-simple/src/lib.rs diff --git a/crates/did-simple/src/methods/key.rs b/did-simple/src/methods/key.rs similarity index 100% rename from crates/did-simple/src/methods/key.rs rename to did-simple/src/methods/key.rs diff --git a/crates/did-simple/src/methods/mod.rs b/did-simple/src/methods/mod.rs similarity index 100% rename from crates/did-simple/src/methods/mod.rs rename to did-simple/src/methods/mod.rs diff --git a/crates/did-simple/src/methods/web.rs b/did-simple/src/methods/web.rs similarity index 100% rename from crates/did-simple/src/methods/web.rs rename to did-simple/src/methods/web.rs diff --git a/crates/did-simple/src/url.rs b/did-simple/src/url.rs similarity index 100% rename from crates/did-simple/src/url.rs rename to did-simple/src/url.rs diff --git a/crates/did-simple/src/utf8bytes.rs b/did-simple/src/utf8bytes.rs similarity index 100% rename from crates/did-simple/src/utf8bytes.rs rename to did-simple/src/utf8bytes.rs diff --git a/crates/did-simple/src/varint.rs b/did-simple/src/varint.rs similarity index 100% rename from crates/did-simple/src/varint.rs rename to did-simple/src/varint.rs diff --git a/crates/header-parsing/Cargo.toml b/header-parsing/Cargo.toml similarity index 100% rename from crates/header-parsing/Cargo.toml rename to header-parsing/Cargo.toml diff --git a/crates/header-parsing/src/lib.rs b/header-parsing/src/lib.rs similarity index 100% rename from crates/header-parsing/src/lib.rs rename to header-parsing/src/lib.rs diff --git a/apps/identity_server/Cargo.toml b/identity-server/Cargo.toml similarity index 98% rename from apps/identity_server/Cargo.toml rename to identity-server/Cargo.toml index 879281d..ef08cd6 100644 --- a/apps/identity_server/Cargo.toml +++ b/identity-server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "identity_server" +name = "identity-server" version.workspace = true license.workspace = true repository.workspace = true diff --git a/apps/identity_server/build.rs b/identity-server/build.rs similarity index 100% rename from apps/identity_server/build.rs rename to identity-server/build.rs diff --git a/apps/identity_server/fixtures/README.md b/identity-server/fixtures/README.md similarity index 100% rename from apps/identity_server/fixtures/README.md rename to identity-server/fixtures/README.md diff --git a/apps/identity_server/fixtures/sample_users.sql b/identity-server/fixtures/sample_users.sql similarity index 100% rename from apps/identity_server/fixtures/sample_users.sql rename to identity-server/fixtures/sample_users.sql diff --git a/apps/identity_server/migrations/20240812062115_users.down.sql b/identity-server/migrations/20240812062115_users.down.sql similarity index 100% rename from apps/identity_server/migrations/20240812062115_users.down.sql rename to identity-server/migrations/20240812062115_users.down.sql diff --git a/apps/identity_server/migrations/20240812062115_users.up.sql b/identity-server/migrations/20240812062115_users.up.sql similarity index 100% rename from apps/identity_server/migrations/20240812062115_users.up.sql rename to identity-server/migrations/20240812062115_users.up.sql diff --git a/apps/identity_server/migrations/README.md b/identity-server/migrations/README.md similarity index 100% rename from apps/identity_server/migrations/README.md rename to identity-server/migrations/README.md diff --git a/apps/identity_server/src/jwk.rs b/identity-server/src/jwk.rs similarity index 100% rename from apps/identity_server/src/jwk.rs rename to identity-server/src/jwk.rs diff --git a/apps/identity_server/src/jwks_provider.rs b/identity-server/src/jwks_provider.rs similarity index 99% rename from apps/identity_server/src/jwks_provider.rs rename to identity-server/src/jwks_provider.rs index 99c7cc3..52cc89e 100644 --- a/apps/identity_server/src/jwks_provider.rs +++ b/identity-server/src/jwks_provider.rs @@ -145,6 +145,7 @@ impl JwksProviderT for HttpProvider { /// Always provides the same JWKs. #[derive(Debug, Clone)] +#[expect(dead_code)] struct StaticProvider(Arc); #[async_trait] diff --git a/apps/identity_server/src/lib.rs b/identity-server/src/lib.rs similarity index 100% rename from apps/identity_server/src/lib.rs rename to identity-server/src/lib.rs diff --git a/apps/identity_server/src/main.rs b/identity-server/src/main.rs similarity index 100% rename from apps/identity_server/src/main.rs rename to identity-server/src/main.rs diff --git a/apps/identity_server/src/oauth.rs b/identity-server/src/oauth.rs similarity index 100% rename from apps/identity_server/src/oauth.rs rename to identity-server/src/oauth.rs diff --git a/apps/identity_server/src/uuid.rs b/identity-server/src/uuid.rs similarity index 100% rename from apps/identity_server/src/uuid.rs rename to identity-server/src/uuid.rs diff --git a/apps/identity_server/src/v1/mod.rs b/identity-server/src/v1/mod.rs similarity index 100% rename from apps/identity_server/src/v1/mod.rs rename to identity-server/src/v1/mod.rs diff --git a/rust-toolchain.toml b/rust-toolchain.toml index bf1ab65..6c352fe 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.78.0" # See workspace Cargo.toml +channel = "1.81.0" # See workspace Cargo.toml components = ["rust-src"] profile = "default" targets = ["x86_64-pc-windows-msvc", "aarch64-linux-android", "x86_64-unknown-linux-gnu"]