Skip to content

Eyevinn/wasm-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasm-runner

Docker container that downloads a WASM compiled file and running using wasmedge runtime. Available as an open web service in Eyevinn Open Source Cloud.

Badge OSC

Usage

Build container image:

% docker build -t wasm-runner:local .

Create a sample application (example in Rust)

fn main() {
  println!("Hello, world!");
}

Compile to wasm:

% rustup target add wasm32-wasip1
% rustc main.rs --target wasm32-wasip1

Upload main.wasm to a bucket for download and then run the container providing the URL to the WASM file:

% docker run --rm \
  -p 8080:8080 \
  -e WASM_URL=https://eyevinnlab-birme.minio-minio.auto.prod.osaas.io/code/main.wasm \
  wasm-runner:local

The WASM application main.wasm can now be invoked through the HTTP server on port 8080. Provides these endpoints:

Method Path Description
GET / Invoke the application and return what the application writes to STDOUT
POST / Invoke the application and the request body is provided to the application on STDIN. Return STDOUT output
% curl http://localhost:8080/
Hello, world!

Contributing

See CONTRIBUTING

License

This project is licensed under the MIT License, see LICENSE.

Support

Join our community on Slack where you can post any questions regarding any of our open source projects. Eyevinn's consulting business can also offer you:

  • Further development of this component
  • Customization and integration of this component into your platform
  • Support and maintenance agreement

Contact [email protected] if you are interested.

About Eyevinn Technology

Eyevinn Technology is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor. As our way to innovate and push the industry forward we develop proof-of-concepts and tools. The things we learn and the code we write we share with the industry in blogs and by open sourcing the code we have written.

Want to know more about Eyevinn and how it is to work here. Contact us at [email protected]!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published