e9fdb5600c
Python wheels on Linux require statically linked SSL libraries. We were previously relying on the native-tls-vendored feature in reqwest, but that does not work with Bazel, as openssl-src makes assumptions that break when sandboxed. The static libs distributed by distros like Ubuntu fail to link, and while we could potentially build OpenSSL ourselves, we'd then need to keep it up to date. On Windows and Mac however, native-tls is preferable to ring, as it allows us to get free updates from the OS, and results in a smaller library. Rust currently only supports platform-specific features in nightly, and cargo-raze does not have support for them, so we currently need to override the generated build file with a hand-crafted one that specifies the relative features/deps for each platform. update.py has been updated to automatically keep the version numbers in this file up to date, so it should hopefully not prove too hard to maintain going forward. |
||
---|---|---|
.. | ||
remote | ||
BUILD.bazel | ||
BUILD.reqwest.bazel | ||
Cargo.lock | ||
crates.bzl | ||
licenses.json | ||
raze.toml | ||
README.md | ||
update.py |
This folder integrates Rust crates.io fetching into Bazel.
After updating dependencies in ../rslib/Cargo.toml, change to this folder and run python update.py to update the external Bazel repositories to point to the updated deps.
You will need to have cargo-raze 0.7.0 or later installed, which is not currently included in this Bazel project. You can install it by installing rustup, then running "cargo install cargo-raze".
A couple of crates need extra work to build with Bazel, and are listed in raze.toml. For example:
[raze.crates.ring.'*']
data_attr = "glob([\"src/**\"])"
With minor version updates, you should not normally need to modify the entries in that file.
The ../pylib/rsbridge folder has a dependency on pyo3, which is special-cased in update.py. If updating the pyo3 version, update.py needs to be updated as well.