Skip to content

Commit

Permalink
Update the setup script to install Rust, and to update serde version.
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitbhrdwj committed Jan 24, 2019
1 parent e9b348f commit 59d2025
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ following
3. Next, run `scripts/setup.py --full` from the root directory on both machines.
This script installs Rust, DPDK, and binds a 10 GbE network card to DPDK.
It saves the PCI and MAC addresses of the bound NIC to a file called `nic_info`.
Run - `source $HOME/.cargo/env` once the script is done.
4. Create a toml file (`db/server.toml`) for the server on one machine, and a
toml file (`db/client.toml`) for the client on the other machine. There are
example files under `db`.
Expand Down
12 changes: 7 additions & 5 deletions scripts/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def printColor(color, string):
def setupCargo():
printColor("bold", "=============== Fixing Deps ==========================")
fix = "cargo generate-lockfile; " + \
"cargo update -p spin:0.4.9 --precise 0.4.7; " + \
"cargo update -p serde:1.0.78 --precise 1.0.37; " + \
"cargo update -p serde_derive:1.0.78 --precise 1.0.37; " + \
"cargo update -p spin:0.4.10 --precise 0.4.7; " + \
"cargo update -p serde:1.0.85 --precise 1.0.37; " + \
"cargo update -p serde_derive:1.0.85 --precise 1.0.37; " + \
"cargo update -p env_logger:0.5.13 --precise 0.5.3; "

# Fix dependencies inside db.
Expand Down Expand Up @@ -102,9 +102,10 @@ def setupDevEnvt():
"""
def installRust():
printColor("bold", "=============== Installing Rust ======================")
subprocess.check_call("curl -s https://static.rust-lang.org/rustup.sh | " +\
"sh -s -- --channel=nightly --date=2018-08-02",
subprocess.check_call("curl -s https://sh.rustup.rs -sSf | " +\
"sh -s -- --default-toolchain nightly-2018-08-02",
shell=True)
os.environ["PATH"] += ":" + os.environ["HOME"] + "/.cargo/bin"
return

if __name__ == "__main__":
Expand Down Expand Up @@ -138,4 +139,5 @@ def installRust():
if args.full or args.fixCargoDep:
setupCargo()

print "\n\tRun- source $HOME/.cargo/env\n"
sys.exit(0)

0 comments on commit 59d2025

Please sign in to comment.