diff --git a/cargo/README.md b/cargo/README.md new file mode 100644 index 000000000..544536b4e --- /dev/null +++ b/cargo/README.md @@ -0,0 +1,25 @@ +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.6.1 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: + +```toml +[raze.crates.ring.'0.16.15'] +data_attr = "glob([\"src/**\"])" +``` + +After updating dependencies, if one of these crates has changed to a +new version, the version in raze.toml will need to be updated, and +update.py re-run. + +The ../pylib/rsbridge folder has a dependency on pyo3, which is +special-cases in update.py. If updating the pyo3 version, raze.toml +and update.py need to be updated as well. diff --git a/cargo/update.py b/cargo/update.py index 8a0664546..e4f26b685 100644 --- a/cargo/update.py +++ b/cargo/update.py @@ -1,13 +1,9 @@ #!/usr/bin/env python3 # -# Fetches dependencies from ../rslib/Cargo.toml, adds pyo3 -# for rsbridge, runs cargo update, then outputs the dependencies -# as Bazel targets. -# +# See README.md EXTRA_DEPS = [ - # when updating, the version number in raze.toml will need updating too - 'pyo3 = { version = "0.12.0", features = ["extension-module"] }' + 'pyo3 = { version = "0.12.3", features = ["extension-module"] }' ] import os diff --git a/pip/README.md b/pip/README.md index 64d3de558..64d222871 100644 --- a/pip/README.md +++ b/pip/README.md @@ -5,8 +5,6 @@ it will miss packages that are required on Windows and vice versa. So we're stuck manually merging dependencies for now. To update deps: -- comment out the pyaudio line starting with https:// in requirements.txt, - as pip-tools can't handle it - run 'bazel run update' to update requirements.txt for the current platform - consult the git diff, and manually merge the changes, undoing the removal