Multiplayer Social Deduction game
First, download and enter the git repository:
git clone https://www.github.com/mafia-rust/mafia
cd mafia
From here it's recommended to split terminals (If you're using VSCode), or open up a second terminal - one for client and one for server.
Enter the client directory and install the required dependencies using npm.
cd client
npm install
You can now start the client frontend using npm. If you're using WSL, you need to execute with sudo
npm start
Follow the tutorial on the rust website.
If you're using VSCode, it's recommended to download the following extensions to make working on the project easier:
- Rust Analyzer - You probably already have this. You definitely need it.
- Even Better Toml - Language support for .TOML files
- Crates - Helps manage crate versions
- Error Lens - Show error messages inline
- GitLens - View git blame inline
- Spell checker - Spelling corrections
It's also a good idea to install clippy (a linter):
rustup component add clippy
You can make it the default linter using this setting (but you don't need to):
"rust-analyzer.check.command": "clippy",
Enter the server directory and build the project using cargo.
cd server
cargo build
Note: If the above step fails, and you are using Linux or WSL, you may need to install OpenSSL first.
You can now start the server backend:
cargo run
We have built an install script that automatically pulls all the dependencies. Run the following command as the root user
curl -fSsL https://raw.githubusercontent.com/mafia-rust/mafia/main/system/install.sh | sh
./mafia/system/update.sh