From e1efb2674556b0b06ead8c317fcc6db8194a9f27 Mon Sep 17 00:00:00 2001 From: Oliver Enes Date: Mon, 30 Sep 2024 21:25:05 +0200 Subject: [PATCH] added build instructions and tests --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 7ea57e5..c6bdbca 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,36 @@ Alice is served as a standalone web app, using Rust and WebAssembly for its back https://github.com/user-attachments/assets/5eb95673-c5f0-4552-8cd1-b251c0f4a62f +# Build Instructions + +## Prerequisites + +To build Alice, ensure that you have the following installed: + +1. **Rust**: Install Rust from [rust-lang.org](https://www.rust-lang.org/). +2. **wasm-pack**: Install wasm-pack from [rustwasm.github.io](https://rustwasm.github.io/wasm-pack/). +3. **NodeJs** and **NPM**: Install NodeJs and NPM from [nodejs.org](https://nodejs.org/). + +## Step 1: Build the WebAssembly Binary of the Backend + +In the root directory of the project, run the following command to build the WebAssembly binary: + +`wasm-pack build` + +## Step 2: Build the Frontend + +Navigate to the `frontend` directory. Make sure the required dependices are installed by running `npm install`. Then run + +`npm run build` + +This will bundle the frontend assets and the WebAssembly binary and the final files will be output to the `dist` folder in the project root directory. These can be served by any HTTP server. + +# Tests + +Alice has a series of autmatic tests. To run them, make sure you are in the project root and run: + +`cargo test` + # License Alice is licensed under the MIT License. See [LICENSE] for the full license text.