Skip to content

hyperlight-dev/wasm-udp-echo-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wasm UDP Echo Example

Prerequisites

  1. Rust
  2. cargo-component
  3. wit-bindgen-cli
  4. wasm-tools
  5. wac

The component tooling dependencies can be installed via cargo from a working Rust installation:

cargo install cargo-component  # to build the project
cargo install wit-bindgen-cli  # to generate the guest bindings
cargo install wasm-tools       # to get data from the wasm artifacts
cargo install wac              # to link and create the stubs

Building

cargo component build

Running

To run with Hyperlight-Wasm, see the example host repository.

To run with wasmtime directly for development and testing:

wasmtime run -Sinherit-network target/wasm32-wasip1/debug/udp_echo_server.wasm

In either case, the wasm component should produce no standard output and wait forever to receive datagrams via UDP on 127.0.0.1 port 8080.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages