Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shivaylamba/rust-wasm-microservice-demo
https://github.com/shivaylamba/rust-wasm-microservice-demo
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/shivaylamba/rust-wasm-microservice-demo
- Owner: shivaylamba
- Created: 2022-12-27T05:57:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T19:30:53.000Z (over 1 year ago)
- Last Synced: 2024-05-20T15:13:03.648Z (6 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
In this repo, there is a demonstratation of a microservice written in Rust, and connected to a MySQL database. It supports CRUD operations on a database table via a HTTP service interface. The microservice is compiled into WebAssembly (Wasm) and runs in the WasmEdge Runtime, which is a secure and lightweight alternative to natively compiled Rust apps in Linux containers.
## Quickstart with Docker
The easiest way to get started is to use a version of Docker Desktop or Docker CLI with Wasm support.
* [Install Docker Desktop + Wasm (Beta)](https://docs.docker.com/desktop/wasm/)
* [Install Docker CLI + Wasm](https://github.com/chris-crone/wasm-day-na-22/tree/main/server)Then, you just need to type one command.
```bash
docker compose up
```This will build the Rust source code, run the Wasm server, and startup a MySQL backing database. It also starts a basic STATIC web interface (available at http://localhost:8090). See the [Dockerfile](Dockerfile) and [docker-compose.yml](docker-compose.yml) files.