From 59d2025b7aa7c7f83b72a62c0df41ed411878ef5 Mon Sep 17 00:00:00 2001 From: ankit-iitb Date: Thu, 24 Jan 2019 14:02:02 -0700 Subject: [PATCH] Update the setup script to install Rust, and to update serde version. --- README.md | 1 + scripts/setup.py | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c9d8025..bd9f38d 100644 --- a/README.md +++ b/README.md @@ -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`. diff --git a/scripts/setup.py b/scripts/setup.py index e0c723a..1658b10 100755 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -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. @@ -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__": @@ -138,4 +139,5 @@ def installRust(): if args.full or args.fixCargoDep: setupCargo() + print "\n\tRun- source $HOME/.cargo/env\n" sys.exit(0)