Installation
Sail is available as a Python package on PyPI. You can install it using pip
.
pip install "pysail==0.2.0.dev0"
Installation from Source
INFO
This installation method is recommended when performance is critical for your application.
When the pre-built wheels is not available for your platform, the pip install
command downloads the source distribution and builds Sail from source. You need the following build tools for this process.
- A recent version of the stable Rust toolchain. You can manage the Rust toolchain using rustup.
- The Protocol Buffers compiler (
protoc
).
Installation from source may take 10 - 30 minutes, and the actual build time depends on your system configuration. You can pass the -v
option to the pip install
command to get more insights into the build process.
Sometimes, you may want to build Sail from source even when the pre-built wheels are available. This can be useful when you want to have Sail optimized for your hardware architecture. For example, the following command builds Sail with all features of the current CPU enabled.
env RUSTFLAGS="-C target-cpu=native" pip install "pysail==0.2.0.dev0" -v --no-binary pysail
INFO
You can refer to the Rust documentation for more information about the compiler options that can be specified via the RUSTFLAGS
environment variable.
Standalone Binary
Please refer to the Standalone Binary guide for more information about building and running the Sail CLI as a standalone binary.