Installing

Rust Install

You can install Styx as a normal rust dependency.

Styx is not on crates.io (yet) so it must be added as a local path or via git.

If Styx is already checked out locally you can specify the dependency as a path. Use cargo add at the root of your crate that will use the Styx library.

$ cargo add --path ../path/to/styx-emulator/styx

Note

Be sure to point to the styx/ subdirectory of the source tree. This is the home of the styx-emulator crate.

You can also install the crate from the remote git repo using ssh or http authentication.

$ cargo add --git ssh://git@github.com/styx-emulator/styx-emulator.git styx-emulator
$ cargo add --git https://github.com/styx-emulator/styx-emulator.git styx-emulator

Python Bindings

You have two paths, either installing pre-built artifacts, or installing from source

Remember that we only support linux targets.

Installing Pre-Built Artifacts

Note that we currently only ship pre-made pip wheels, on the roadmap are the following additional premade artifacts:

C library:

  • ubuntu/debian .deb`’s

  • RHEL based .rpm’s

Linux binary executables:

  • ubuntu/debian .deb’s

  • RHEL based .rpm’s

  • Appimage

Docker containers:

  • binary executable

  • userspace emulation daemon

We are also working on adding builtin artifact signing + SBOM generation to ensure smooth approvals for using Styx in secure/audited environments.

pip installing Styx python bindings

pip install styx-py-api

See https://pip.pypa.io/en/stable/cli/pip_install/ for more information.

Installing from Source

NOTE: ensure you install the dependencies before building the project from source:

  • Rust 1.88.0

  • Python > 3.9

  • python3-virtualenv

  • python3-pip

  • protobuf-compiler (ensure that the lib is included, sometimes called eg. libprotobuf-dev on ubuntu based systems)

  • cmake

  • gdb-multiarch (gdb on RHEL systems)

git clone https://github.com/styx-emulator/styx-emulator
cargo install just
just setup

# install python api into local virtual env
. venv/bin/activate
pip install styx/bindings/styx-py-api

# now use the python api
$ python
Python 3.12.8 (main, Dec  6 2024, 00:00:00) [GCC 14.2.1 20240912 (Red Hat 14.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import styx_emulator
>>>