4 releases (breaking)
Uses new Rust 2024
| new 0.4.0 | Feb 5, 2026 |
|---|---|
| 0.3.0 | Jan 28, 2026 |
| 0.2.0 | Nov 3, 2025 |
| 0.1.0 | Oct 11, 2025 |
#906 in Network programming
Used in 2 crates
1.5MB
24K
SLoC
SCION endhost software development kit (SDK)
Supercharge your applications with SCION's path-aware networking capabilities!
The SCION endhost SDK provides the tools and libraries necessary to build applications that can leverage the full potential of the SCION Internet architecture. It enables developers to create path-aware, secure, and reliable applications that can intelligently select their network paths, providing enhanced control over their network traffic.
Usage
This crate provides the ScionStack type - a stateful object that is the conceptual equivalent of
the UDP/TCP/IP networking stack found in typical operating systems.
The following example demonstrates how to create a ScionStack and bind a path-aware UDP socket.
This type of socket automatically manages path selection, simplifying the process of sending and
receiving data over the SCION network.
use scion_proto::address::SocketAddr;
use scion_stack::scionstack::{ScionStack, ScionStackBuilder};
use url::Url;
async fn socket_example() -> Result<(), Box<dyn std::error::Error>> {
let endhost_api: url::Url = "http://127.0.0.1:1234".parse()?;
let builder = ScionStackBuilder::new(endhost_api);
let scion_stack = builder.build().await?;
let socket = scion_stack.bind(None).await?;
let destination: SocketAddr = "1-ff00:0:111,[192.168.1.1]:8080".parse()?;
socket.send_to(b"hello", destination).await?;
let mut buffer = [0u8; 1024];
let (len, src) = socket.recv_from(&mut buffer).await?;
println!("Received: {:?} from {:?}", &buffer[..len], src);
Ok(())
}
Refer to the crate documentation for more details and advanced usage.
Dependencies
~56–82MB
~1.5M SLoC