You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2023. It is now read-only.
externcrate embly;use embly::{
http::{run_catch_error,Body,Request,ResponseWriter},
prelude::*,Error,};asyncfnexecute(_req:Request<Body>,mutw:ResponseWriter) -> Result<(),Error>{
w.write_all(b"Hello World")?;// writing our hello response bytesOk(())// if an error is returned the server will respond with an HTTP error}// this function is run firstfnmain(){run_catch_error(execute);// this is the embly::http::run function that is specific to http responses}
You can now run your project for local development with embly dev, although the fastest way to get started is with docker:
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/app -p 8765:8765 -it embly/embly embly dev
$ embly
Usage: embly [--version] [--help] <command> [<args>]
Available commands are:
build Build an embly project
bundle Create a bundled project file
db Run various database maintenace tasks.
dev Develop a local embly project
run Run a local embly project
Installation
embly uses docker to download and run build images. It's recommended that you run embly from within a docker container and give it access to the docker socket. If you are in the root of an embly project you can start the dev server like so:
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd):/app -p 8765:8765 -it embly/embly embly dev
If you would like to run embly locally you'll need to have cargo and go installed. The following sequence of commands should work:
go get github.com/embly/embly/cmd/embly
cargo install embly-wrapper
cargo install lucetc
embly used to be wasabi, which was more focused on providing full operating system functionality within a
webassembly runtime. That code is available here.
About
Attempt at building an opinionated webassembly runtime for web services