
Path-aware endhost toolkit enabling applications to inspect and select network paths, steer per-packet traffic, fail over instantly, verify cryptographic path authenticity, with simulators and HTTP/3 bindings.
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.
This SDK is developed and maintained by Anapaya, a leading SCION technology company. We thank our colleagues at Mysten Labs for publishing scion-rs upon which parts of this SDK are based.
SCION is an inter-domain networking architecture — think of it as an alternative to today's BGP-routed Internet — with one property that matters most to application developers: the application, not the network, chooses the path its packets take.
On the SCION network you can:
The main entry point for using the SCION endhost SDK is the scion-stack
crate. It provides the ScionStack type - a stateful object that is the conceptual equivalent of
the UDP/TCP/IP networking stack found in typical operating systems.
To use the SCION endhost SDK in your Rust project, add the scion-stack crate as a dependency in
your Cargo.toml:
cargo add scion-stackThe 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_stack::stack::{ScionStack, ScionStackBuilder};
use sciparse::address::ip_socket_addr::ScionSocketIpAddr;
use url::Url;
async fn socket_example() -> Result<(), Box<dyn std::error::Error>> {
// Point the stack at your local SCION endhost API.
let endhost_api: Url = "http://127.0.0.1:1234".parse()?;
let builder = ScionStackBuilder::new().with_endhost_api(endhost_api);
let scion_stack = builder.build().await?;
let socket = scion_stack.bind(None).await?;
let destination: ScionSocketIpAddr = "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(())
}The full developer guide is published at https://learn.anapaya.net/docs/academy/scion-sdk. That site tracks the latest released version of the SDK.
The chat example application is a chat server and three clients, in the terminal, on Android and on iOS, built on top of the SDK.
To preview the documentation for the current HEAD of this repository instead, use the standalone
preview app in docs/preview/:
cd docs/preview
pnpm install
pnpm start # http://localhost:3000 (live reload)The SCION endhost SDK lives under crates/, organized into building-block libraries (crates/libs/) and API/RPC binding families (crates/apis/), with the main components at the top level. The most relevant crates are:
ScionStack and related components for building SCION applications.Language bindings live outside crates/:
arm64-v8a and
x86_64.net.anapaya.scion:ktor-client-scion and net.anapaya.scion:ktor-client-scion-testing.We welcome contributions from the community! If you'd like to help improve the SCION endhost SDK, here's how you can get started:
main branch of the original repository.For larger features or significant changes, we recommend opening an issue first to discuss your plans with the maintainers. This helps ensure that your work aligns with the project's goals and avoids duplication of effort.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
For any questions or inquiries, please contact us at scion-sdk@anapaya.net.
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.
This SDK is developed and maintained by Anapaya, a leading SCION technology company. We thank our colleagues at Mysten Labs for publishing scion-rs upon which parts of this SDK are based.
SCION is an inter-domain networking architecture — think of it as an alternative to today's BGP-routed Internet — with one property that matters most to application developers: the application, not the network, chooses the path its packets take.
On the SCION network you can:
The main entry point for using the SCION endhost SDK is the scion-stack
crate. It provides the ScionStack type - a stateful object that is the conceptual equivalent of
the UDP/TCP/IP networking stack found in typical operating systems.
To use the SCION endhost SDK in your Rust project, add the scion-stack crate as a dependency in
your Cargo.toml:
cargo add scion-stackThe 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_stack::stack::{ScionStack, ScionStackBuilder};
use sciparse::address::ip_socket_addr::ScionSocketIpAddr;
use url::Url;
async fn socket_example() -> Result<(), Box<dyn std::error::Error>> {
// Point the stack at your local SCION endhost API.
let endhost_api: Url = "http://127.0.0.1:1234".parse()?;
let builder = ScionStackBuilder::new().with_endhost_api(endhost_api);
let scion_stack = builder.build().await?;
let socket = scion_stack.bind(None).await?;
let destination: ScionSocketIpAddr = "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(())
}The full developer guide is published at https://learn.anapaya.net/docs/academy/scion-sdk. That site tracks the latest released version of the SDK.
The chat example application is a chat server and three clients, in the terminal, on Android and on iOS, built on top of the SDK.
To preview the documentation for the current HEAD of this repository instead, use the standalone
preview app in docs/preview/:
cd docs/preview
pnpm install
pnpm start # http://localhost:3000 (live reload)The SCION endhost SDK lives under crates/, organized into building-block libraries (crates/libs/) and API/RPC binding families (crates/apis/), with the main components at the top level. The most relevant crates are:
ScionStack and related components for building SCION applications.Language bindings live outside crates/:
arm64-v8a and
x86_64.net.anapaya.scion:ktor-client-scion and net.anapaya.scion:ktor-client-scion-testing.We welcome contributions from the community! If you'd like to help improve the SCION endhost SDK, here's how you can get started:
main branch of the original repository.For larger features or significant changes, we recommend opening an issue first to discuss your plans with the maintainers. This helps ensure that your work aligns with the project's goals and avoids duplication of effort.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
For any questions or inquiries, please contact us at scion-sdk@anapaya.net.