Install NSB and prepare your environment in just a few minutes. Pick your platform, install dependencies, build from source, and verify each step before moving on.
NSB (Network Simulation Bridge) is open-source middleware that connects real applications to network simulators. It lets your application send and receive messages through a simulated network without changing your application code.
Learn more in the docs โThe following packages must be installed before building NSB. Also requires Python 3.7+ or a C++17 compiler.
Choose your platform and follow the steps.
brew install cmake pkg-config abseil protobuf yaml-cpp redis hiredisgit clone https://github.com/nsb-ucsc/nsb_beta.git
cd nsb_betamkdir buildnsb/
โโโ build/
โโโ proto/
โโโ python/
โโโ cpp/
โโโ CMakeLists.txt
โโโ config.yaml
โโโ README.mdcd build
cmake ..
cmake --build . --parallelcmake --build . --clean-first.[cmake] -- Checking target libraries:
[cmake] -- โ Found target: yaml-cpp::yaml-cpp
[cmake] -- โ Found target: protobuf::libprotobuf
[cmake] -- โ Found target: absl::base
[cmake] -- โ Found target: absl::log
[cmake] -- โ Found target: absl::time
[cmake] -- โ Found target: absl::log_internal_check_op
[cmake] -- โ Found target: absl::log_initialize
[cmake] -- โ Found target: PkgConfig::hirediscmake --install .[install_path]/nsb/lib/libnsb.*[install_path]/nsb/include/[install_path]/nsb/bin/nsb_daemon[install_path]/lib/pkgconfig/nsb.pccd python/
pip install -r requirements.txt
pip install -e .
echo 'export PYTHONPATH="${PYTHONPATH}:/.../nsb/python"' >> ~/.zshrc/[your/install/path]/nsb/bin/nsb_daemon --helppython3 - <<'EOF'
import proto.nsb_pb2 as nsb_pb2
print("NSB Python proto loaded from:", nsb_pb2.__file__)
EOFConfirm all steps before continuing to the Quickstart.
The most frequently encountered problems during installation.