Compare commits
2 Commits
6056492128
...
ff50ccea09
| Author | SHA1 | Date | |
|---|---|---|---|
| ff50ccea09 | |||
| 963f3d9532 |
3251
Cargo.lock
generated
3251
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"crates/alknet-vault",
|
"crates/alknet-vault",
|
||||||
|
"crates/alknet-core",
|
||||||
]
|
]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
|
|||||||
32
crates/alknet-core/Cargo.toml
Normal file
32
crates/alknet-core/Cargo.toml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
[package]
|
||||||
|
name = "alknet-core"
|
||||||
|
version.workspace = true
|
||||||
|
edition.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
description = "Core library for ALPN-based protocol dispatch: ProtocolHandler trait, Connection, auth, config, and multi-connectivity endpoint"
|
||||||
|
repository.workspace = true
|
||||||
|
|
||||||
|
[lib]
|
||||||
|
name = "alknet_core"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["quinn"]
|
||||||
|
quinn = ["dep:quinn"]
|
||||||
|
iroh = ["dep:iroh"]
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
tokio = { version = "1", features = ["full"] }
|
||||||
|
quinn = { version = "0.11", optional = true }
|
||||||
|
iroh = { version = "0.35", optional = true }
|
||||||
|
rustls = "0.23"
|
||||||
|
rustls-pki-types = "1"
|
||||||
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
serde_json = "1"
|
||||||
|
toml = "0.8"
|
||||||
|
arc-swap = "1"
|
||||||
|
async-trait = "0.1"
|
||||||
|
tracing = "0.1"
|
||||||
|
thiserror = "2"
|
||||||
|
zeroize = { version = "1", features = ["derive"] }
|
||||||
|
bytes = "1"
|
||||||
|
futures = "0.3"
|
||||||
6
crates/alknet-core/src/auth.rs
Normal file
6
crates/alknet-core/src/auth.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
//! Authentication: `AuthContext`, `Identity`, `IdentityProvider`, `AuthToken`,
|
||||||
|
//! `ConfigIdentityProvider`.
|
||||||
|
//!
|
||||||
|
//! See `docs/architecture/crates/core/auth.md` for the full specification.
|
||||||
|
|
||||||
|
// TODO: implement
|
||||||
6
crates/alknet-core/src/config.rs
Normal file
6
crates/alknet-core/src/config.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
//! Configuration: `StaticConfig`, `DynamicConfig`, `AuthPolicy`, `ApiKeyEntry`,
|
||||||
|
//! `RateLimitConfig`, `ConfigReloadHandle`, `ConfigError`, `TlsIdentity`.
|
||||||
|
//!
|
||||||
|
//! See `docs/architecture/crates/core/config.md` for the full specification.
|
||||||
|
|
||||||
|
// TODO: implement
|
||||||
5
crates/alknet-core/src/endpoint.rs
Normal file
5
crates/alknet-core/src/endpoint.rs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
//! Endpoint: `AlknetEndpoint`, `HandlerRegistry`, `EndpointError`.
|
||||||
|
//!
|
||||||
|
//! See `docs/architecture/crates/core/endpoint.md` for the full specification.
|
||||||
|
|
||||||
|
// TODO: implement
|
||||||
12
crates/alknet-core/src/lib.rs
Normal file
12
crates/alknet-core/src/lib.rs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
//! alknet-core: Core library for ALPN-based protocol dispatch.
|
||||||
|
//!
|
||||||
|
//! Every handler crate depends on this crate. It provides the
|
||||||
|
//! [`ProtocolHandler`][crate::types::ProtocolHandler] trait, the
|
||||||
|
//! [`Connection`][crate::types::Connection] wrapper, auth primitives,
|
||||||
|
//! hot-reloadable configuration, and the [`AlknetEndpoint`][crate::endpoint::AlknetEndpoint]
|
||||||
|
//! that dispatches incoming QUIC connections by ALPN string.
|
||||||
|
|
||||||
|
pub mod auth;
|
||||||
|
pub mod config;
|
||||||
|
pub mod endpoint;
|
||||||
|
pub mod types;
|
||||||
6
crates/alknet-core/src/types.rs
Normal file
6
crates/alknet-core/src/types.rs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
//! Core types: `ProtocolHandler`, `HandlerError`, `Connection`, `BiStream`,
|
||||||
|
//! `SendStream`, `RecvStream`, `StreamError`, `Capabilities`.
|
||||||
|
//!
|
||||||
|
//! See `docs/architecture/crates/core/core-types.md` for the full specification.
|
||||||
|
|
||||||
|
// TODO: implement
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
id: core/crate-init
|
id: core/crate-init
|
||||||
name: Initialize alknet-core crate with Cargo.toml, dependencies, and module skeleton
|
name: Initialize alknet-core crate with Cargo.toml, dependencies, and module skeleton
|
||||||
status: pending
|
status: completed
|
||||||
depends_on: []
|
depends_on: []
|
||||||
scope: moderate
|
scope: moderate
|
||||||
risk: low
|
risk: low
|
||||||
@@ -113,4 +113,8 @@ subsequent tasks (core-types, config, auth, endpoint) fill these in.
|
|||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
> To be filled on completion
|
Created `crates/alknet-core/` with `Cargo.toml` (all 14 dependencies, quinn/iroh
|
||||||
|
feature flags per ADR-010), `src/lib.rs` with module declarations, and 4 skeleton
|
||||||
|
module files (`types.rs`, `auth.rs`, `config.rs`, `endpoint.rs`) with doc comments
|
||||||
|
and TODO markers. Added to workspace `members`. `cargo check`/`clippy`/`fmt` clean.
|
||||||
|
Merged to develop.
|
||||||
Reference in New Issue
Block a user