Skip to content

mafia-rust/mafia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mafia

Multiplayer Social Deduction game

Getting Started

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.

Client setup

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

Server setup

Install Rust

Follow the tutorial on the rust website.

VScode

If you're using VSCode, it's recommended to download the following extensions to make working on the project easier:

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",

Starting the server

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

Production Enviornment

Install

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

Update

./mafia/system/update.sh