Skip to content

egccri/wasm-app-runtime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2d55fc8 · Feb 10, 2024

History

73 Commits
Jun 25, 2023
Dec 27, 2023
Dec 19, 2023
Feb 10, 2024
Dec 20, 2023
Jun 25, 2023
Aug 21, 2023
Aug 16, 2023
Dec 27, 2023
Dec 27, 2023
Aug 16, 2023
Dec 20, 2023
Jun 25, 2023
Aug 23, 2023
May 16, 2023
Aug 21, 2023

Repository files navigation

egccri-runtime

An experimental wasm app runtime.

Wasi include in wasm-component(contains interface type), define in wit file, then use linker link to the wasmtime component.

Features

  • async
  • multi invokers

How to Use

# run server
egccri run 0.0.0.0:9999

# install app use client
egccri-client -s 127.0.0.1:9999 install grpc-service 0.1.0

Other

Publish and run guest from registry.

cargo install --git https://github.com/bytecodealliance/registry

Use cargo component impl guest.

cargo component build

Example

How to add a pub/sub support with rust and wasmtime?

  • consider use wasi support io function
  • design a pub/sub protocol base tcp
  • use a wit file to describe pub/sub interface
  • use wit-bindgen generate host/guest code
  • impl pub/sub base host generate code with wasmtime
  • link pub/sub component to wasmtime
  • give a sdk use wit-bindgen(extend 'C')
  • write a guest crate to use pub/sub sdk
  • support run wasm with cmd or invoker

Flow upcoming wasi-messaging version and impl Host function base tcp.

Q&A

Wasi preview1 different with preview2? Wasi standard changed, how rust compiler also need change? watch lib/sys/wasi. Wasi func store where in wasm binary? import section.

About

An experimental wasm app runtime.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages