Skip to content

Kotlin/hyperlight-wasm-http-example

 
 

Repository files navigation

hyperlight-wasm http example: Kotlin

This is a minimal example of a hyperlight-wasm host application. It implements just enough of the wasi:http api to run the sample-wasi-http-kotlin server.

It's forked from https://github.com/hyperlight-dev/hyperlight-wasm-http-example, as the changes here are specific to a Kotlin guest component. It is intended for demonstration purposes only, and not guaranteed to be kept up-to-date.

In general, this example is only a prototype, and relatively hacky and fragile, use at your own risk.

Prerequisites

  1. Rust, including the x86_64-unknown-none target (which may be installed via e.g. rustup target add x86_64-unknown-none)
    • Specifically, we need both Rust versions 1.87 and 1.89
  2. clang
  3. just
  4. All requirements of sample-wasi-http-kotlin server, except for wasmtime.

Setup

NOTE: The build system fetches multiple git repositories (sometimes recursively). That means that updating one of them might not correctly propagate "all the way up", so if in doubt, run just clean.

Building

just build

Running

just run

From another terminal, you can then test the server with the included curlIt.sh script:

./curlIt.sh

About

An http server compiled to a Wasm component using Kotlin/Wasm, run in a custom hyperlight fork.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 99.6%
  • Other 0.4%