pd-edge
pd-edge is the edge data-plane runtime plus the edge ABI for running VM programs at the edge.
Cargo usage
The workspace uses sibling RustScript crates during local development. For downstream Cargo manifests, use these repository references:
pd-vm = { git = "https://github.com/rustscript-lang/rustscript", package = "pd-vm" }
pd-edge-abi = { git = "https://github.com/rustscript-lang/pd-edge", package = "pd-edge-abi" }
pd-edge = { git = "https://github.com/rustscript-lang/pd-edge", package = "pd-edge" }
Test
cargo test --workspace
cargo build --workspace --release
Runtime guide
pd-edge is the edge runtime crate for running VM programs at the edge.
This crate now ships three binaries with different scopes:
pd-edge-http-proxy: full HTTP data plane runtime (proxy path + admin API + optional active control-plane client)pd-edge-console: interactive local console runtime (stdin/stdout/stderr host APIs + optional active control-plane client)pd-edge-sample-echo-server: local multi-protocol echo server for manual transport and host-ABI testing
Contents
- Binary Scope
- pd-edge-http-proxy
- pd-edge-console
- pd-edge-sample-echo-server
- Quick Start
- HTTP Proxy Mode
- Console Mode
- Sample Echo Server
- HTTP Proxy Admin API
- CLI
- pd-edge-http-proxy
- pd-edge-console
- pd-edge-sample-echo-server
- Active Control-Plane RPC
- Example
- HTTP Proxy Performance Framework
- Layered DAGs
- ABI Source of Truth
- Release Artifacts
- Docker
- Codebase Layout
Binary Scope
pd-edge-http-proxy
- Handles HTTP traffic on a data plane listener
- Exposes local admin APIs for program upload, health, metrics, telemetry, and debug session lifecycle
- Can run standalone (admin upload only) or with active control-plane RPC
- Registers HTTP host ABI + runtime host ABI + built-in IO overrides
Default listeners:
- Data plane:
0.0.0.0:8080 - Admin API:
127.0.0.1:8081
pd-edge-console
- No HTTP proxy listeners
- Runs an interactive shell to load and execute VM programs locally
- Supports console host APIs:
console::stdin::read_line(),console::stdin::read_all(),console::stdout::write(text),console::stdout::flush(),console::stderr::write(text),console::stderr::flush() - Registers runtime host ABI (
runtime::sleep,rate_limit::allow) plus the console host APIs above
pd-edge-sample-echo-server
- Starts separate listeners for TCP, UDP, TLS, HTTP, HTTPS, WebSocket, secure WebSocket, MQTT, MQTTS, WebRTC signaling, and a CONNECT forward proxy
- Echoes request bytes, datagrams, HTTP bodies, WebSocket frames, and WebRTC data-channel messages
- Uses a generated self-signed certificate for TLS, HTTPS, and
wss:// - Enables manual end-to-end testing of the feature-gated transport surfaces without uploading a VM program