1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
// Copyright 2025 Anapaya Systems
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! SCION stack library.
//!
//! See `API_CONVENTIONS.md` for the naming, error, builder, and `#[non_exhaustive]` conventions
//! this crate follows.
// Linter baseline for the published API surface. See API_CONVENTIONS.md § Linting.
` is applied deliberately where it matters rather than everywhere.
must_use_candidate,
// `# Errors` / `# Panics` sections are added where they aid the caller, not mechanically.
missing_errors_doc,
missing_panics_doc,
// Casts are used deliberately in scoring/serialization hot paths.
cast_possible_truncation,
cast_precision_loss,
cast_sign_loss,
// `const`/`fn` items declared next to their use inside a function body read fine here.
items_after_statements,
// The following are stylistic preferences we deliberately do not enforce; the underlying code
// is intentional (object-safe `BoxFuture` trait methods, stateless scorer `&self`, explicit
// `match`/`if let` control flow, intentional score equality checks, fixed-size datagram
// buffers).
manual_async_fn,
manual_let_else,
single_match_else,
unused_self,
needless_pass_by_value,
match_same_arms,
ref_option,
large_stack_arrays,
float_cmp,
unnecessary_wraps
)]
pub
// Re-exported dependencies
//
// These crates appear in `scion-stack`'s public API by deliberate choice. They are re-exported here
// so a client can name and construct the types our signatures require *without* adding its own
// direct dependency — which keeps the client pinned to exactly the versions `scion-stack` was built
// against. Reach a type through `scion_stack::<crate>::...`.
//
// Adding a crate to this list is a semver commitment: a breaking release of a re-exported crate is
// a breaking change for `scion-stack`. Do not re-export a crate here unless a type from it is
// intentionally part of the public API. Conversely, no foreign type may appear in a public
// signature without its crate being re-exported here (see the "Dependency exposure" section of
// `API_CONVENTIONS.md`). `tests/public_api_reexports.rs` pins these re-exports so they cannot be
// dropped silently.
/// Endhost API discovery models (`EndhostApiGroup`, `EndhostApiInfo`) returned by
/// [`ea_source::EndhostApiSource`].
pub use anapaya_ead_models;
/// Endhost API client trait consumed by [`path::fetcher::EndhostApiSegmentFetcher::new`].
pub use endhost_api_client;
/// DNS resolver backend. Exposed as the escape hatch behind
/// [`resolver::txt::ScionTxtDnsResolver::builder`] for full control over DNS resolution.
pub use hickory_resolver;
/// HTTP client used by the connect-RPC transport. Exposed by the `with_crpc_client` escape
/// hatch (e.g. [`ScionStackBuilder::with_crpc_client`]) for custom name resolution / TLS.
pub use reqwest;
/// Authentication token-source trait (`TokenSource`) used by the `with_auth_token_source`
/// setters.
pub use reqwest_connect_rpc;
/// Generic SCION UDP socket trait ([`scion_quic::socket::GenericScionUdpSocket`])
/// that [`stack::UdpScionSocket`] implements so it can back QUIC / HTTP/3 connections.
pub use scion_quic;
/// SCION packet, address, path, and policy types (`ScionSocketIpAddr`, `IsdAsn`, `ScionPath`,
/// ...).
///
/// This is the foundational type crate of the SDK and appears throughout `scion-stack`'s API.
pub use sciparse;
/// URL type used to configure endhost API / control-plane addresses.
pub use url;
/// X25519 key type ([`x25519_dalek::StaticSecret`]) for supplying a static SNAP identity via
/// [`stack::builder::SnapUnderlayConfig::with_static_identity`].
pub use x25519_dalek;
// Common entry points are re-exported at the crate root for ergonomics.
pub use crate;