The repository encompasses the backend of a project that ensures secure file transmissions through Identity-Based Encryption (IBE) implemented in Rust, and further compiled into WebAssembly (WASM) for usage within Node.js
The repository is divided into two folders:
- rest-api
- rust
Firstly, make sure you have the Rust programming language and the Node.js environment installed on your computer.
- Compile the Rust code into WebAssembly (Wasm). Run these commands one by one:
# Navigate into the rust directory
cd rust
#Compile local packages and all of their dependencies.
cargo build
#Download and install a tool named 'wasm-pack'.
cargo install wasm-pack
#Compile the code to WebAssembly
wasm-pack build --target nodejs- Install all the required Node.js dependencies.
# Navigate into the rest-api folder
cd rest-api
# Install all the dependencies
npm installBefore running the project locally, ensure that you modify the .env file according to your requirements. The file is located in ./rest-api/.env.
To run the REST API execute the commands.
cd rest-api
npm run startThe REST API will be running on port 3000 if no other port is specified:
127.0.0.1:3000MIT