anki/cargo
Damien Elmes e9fdb5600c use ring on Linux; native-tls on other platforms
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.
2020-11-15 15:25:28 +10:00
..
remote add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10:00
BUILD.bazel update Rust deps 2020-11-15 13:31:24 +10:00
BUILD.reqwest.bazel use ring on Linux; native-tls on other platforms 2020-11-15 15:25:28 +10:00
Cargo.lock add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10:00
crates.bzl use ring on Linux; native-tls on other platforms 2020-11-15 15:25:28 +10:00
licenses.json add native-tls in preparation for Linux-only ring 2020-11-15 14:02:53 +10:00
raze.toml update to cargo-raze 0.7.0 + latest deps 2020-11-10 09:48:42 +10:00
README.md update to cargo-raze 0.7.0 + latest deps 2020-11-10 09:48:42 +10:00
update.py use ring on Linux; native-tls on other platforms 2020-11-15 15:25:28 +10:00

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.