Skip to content

Instantly share code, notes, and snippets.

@peterschwarz
Last active November 2, 2021 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterschwarz/05e24b7abc604cbebbc9b012264d2e4c to your computer and use it in GitHub Desktop.
Save peterschwarz/05e24b7abc604cbebbc9b012264d2e4c to your computer and use it in GitHub Desktop.
Sawtooth Rust SDK Dev - macOS
# This is the current latest, as of 8/16/2018
curl -O https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz
tar xvf zeromq-4.2.5.tar.gz
cd zeromq-4-2.5
./configure
make
sudo make install
# This is the current latest, as of 8/9/2018
curl -O https://www.openssl.org/source/openssl-1.1.0h.tar.gz
tar xvf openssl-1.1.0h.tar.gz
cd openssl-1.1.0h
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
# This is the current latest, as of 8/16/2018
curl -L -O https://github.com/google/protobuf/releases/download/v3.6.1/protobuf-all-3.6.1.tar.gz
./configure
make
sudo make install
@peterschwarz
Copy link
Author

Likewise, you'll need to install pkg-config, which can be install from brew:

$ brew install pkg-config

@sjqnn
Copy link

sjqnn commented Aug 17, 2018

warning you might need curl -OL on any of the curl commands.

@peterschwarz
Copy link
Author

In your rust project, add the following dependency for Sawtooth:

sawtooth_sdk = { git = "https://github.com/hyperledger/sawtooth-core" }

@sjqnn
Copy link

sjqnn commented Aug 17, 2018

also for protobuf you need to cd protobuf-all-3.6.1 before running configure && make but that's probably obvious.

@shannynalayna
Copy link

shannynalayna commented Aug 17, 2018

If you're still having issues with your PKG_CONFIG_PATH after using homebrew to install pkg-config, might need:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment