Skip to content

austinrivas/rust-webasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Web Assembly Starter

Goals

The goal of this project is to create a Rust web server with no dependencies that hosts a small Web Assembly front end client.

Compiling

To compile the application run ./compile.sh.

The script will build a rust-musl-builder docker container to build a dependency free binary of tha app.

The compiled application can be found in ./target/x86_64-unknown-linux-musl/release/hello_world.

You can test the application was built by running ls -lh target/x86_64-unknown-linux-musl/release/hello_world.

Building Image

To build a docker image that will run the application run ./build.sh.

The docker image will be built from scratch and run the application found at found in ./target/x86_64-unknown-linux-musl/release/hello_world.

The docker image will expose the application on port 3000.

Run Container

To run the docker container for the application run ./run.sh.

The script uses docker run to bind port 3000 on the host to port 3000 in the container.

You can test the application is running by running curl localhost:3000.

References

About

A test project that aims to build a small webasm app in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published