From 81c95bae9b6e307d65e5324cb9942e32ee832386 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Fri, 23 Sep 2022 17:21:48 +0200 Subject: [PATCH 1/5] - Update pinned Rust version to 1.64.0 - Make use of the workspace inheritance features for the package table - Bumped Rust version in the github workflows - Added changelog line - Upgrade maturin to 0.13.5 --- .github/workflows/rust.yml | 8 ++++---- CHANGELOG.md | 1 + Cargo.lock | 4 ++-- Cargo.toml | 8 ++++++++ README.md | 4 ++-- crates/re_data_store/Cargo.toml | 8 ++++---- crates/re_error/Cargo.toml | 8 ++++---- crates/re_log/Cargo.toml | 8 ++++---- crates/re_log_types/Cargo.toml | 8 ++++---- crates/re_sdk_comms/Cargo.toml | 8 ++++---- crates/re_string_interner/Cargo.toml | 8 ++++---- crates/re_viewer/Cargo.toml | 8 ++++---- crates/re_web_server/Cargo.toml | 8 ++++---- crates/re_ws_comms/Cargo.toml | 8 ++++---- crates/rerun/Cargo.toml | 8 ++++---- examples/objectron/Cargo.toml | 8 ++++---- rerun_py/Cargo.toml | 9 ++++----- rerun_py/README.md | 4 ++-- rerun_py/requirements-build.txt | 2 +- rust-toolchain | 2 +- scripts/setup.sh | 2 +- 21 files changed, 70 insertions(+), 62 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d7396b5ac974..6d24a346c0ca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,7 +24,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.63.0 + toolchain: 1.64.0 target: wasm32-unknown-unknown override: true - run: sudo apt-get update && sudo apt-get install libgtk-3-dev @@ -49,7 +49,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.63.0 + toolchain: 1.64.0 override: true components: rustfmt - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev # eframe reqs @@ -108,7 +108,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: 1.63.0 + toolchain: 1.64.0 override: true components: rustfmt - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev # eframe reqs @@ -131,7 +131,7 @@ jobs: - uses: actions/checkout@v2 - uses: EmbarkStudios/cargo-deny-action@v1 with: - rust-version: "1.63.0" + rust-version: "1.64.0" lint_py: name: lint.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 35cc9e6660dc..abcdf49ad3af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ A rough time-line of major user-facing things added, removed and changed. Newest on top. +* 2022-09-23: Update pinned rust version to 1.64 and use workspace inheritance ([#110](https://github.com/rerun-io/rerun/pull/110)). * 2022-09-21: Python SDK: add `log_point` ([#106](https://github.com/rerun-io/rerun/pull/106)). * 2022-09-21: Python SDK: add `log_obb` ([#103](https://github.com/rerun-io/rerun/pull/103)). * 2022-09-20: Reduce memory use for image intensive applications ([#100](https://github.com/rerun-io/rerun/pull/100)). diff --git a/Cargo.lock b/Cargo.lock index b4b2e0daa525..9ed28acab842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2121,9 +2121,9 @@ dependencies = [ [[package]] name = "numpy" -version = "0.17.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6522ac2e780f532432a7c7f5dbadbfcea9ff1cf4dd858fb509ca13061a928413" +checksum = "a462c1af5ba1fddec1488c4646993a23ae7931f9e170ccba23e9c7c834277797" dependencies = [ "ahash 0.7.6", "libc", diff --git a/Cargo.toml b/Cargo.toml index f1032a92dfcd..a93f3d12fa95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,14 @@ resolver = "2" members = ["crates/*", "examples/*", "rerun_py"] exclude = ["examples/nyud"] +[workspace.package] +version = "0.1.0" +edition = "2021" +rust-version = "1.64" +license = "MIT OR Apache-2.0" +homepage = "http://rerun.io" +readme = "README.md" +repository = "https://github.com/rerun-io/rerun" [profile.dev] # opt-level = 1 # Speed up debug builds diff --git a/README.md b/README.md index 0cc64fbdcd2a..5dc4e3219efe 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ We don't have any pre-built binaries yet, so you need to build Rerun from source * Install the Rust toolchain: * `git clone git@github.com:rerun-io/rerun.git && cd rerun` * Run `./scripts/setup.sh`. -* Make sure `cargo --version` prints `1.63.0` once you are done +* Make sure `cargo --version` prints `1.64.0` once you are done ### Apple-silicon Macs If you are using an Apple-silicon Mac, make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it: ``` sh -rustup set default-host aarch64-apple-darwin && rustup install 1.63 +rustup set default-host aarch64-apple-darwin && rustup install 1.64 ``` ## Installing the Rerun Viewer diff --git a/crates/re_data_store/Cargo.toml b/crates/re_data_store/Cargo.toml index 462d42e188ab..fb6cb9b88f5a 100644 --- a/crates/re_data_store/Cargo.toml +++ b/crates/re_data_store/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_data_store" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_error/Cargo.toml b/crates/re_error/Cargo.toml index c9e6b46d2d1e..79baa8452520 100644 --- a/crates/re_error/Cargo.toml +++ b/crates/re_error/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_error" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_log/Cargo.toml b/crates/re_log/Cargo.toml index 20a5652033d2..2f3d080289ed 100644 --- a/crates/re_log/Cargo.toml +++ b/crates/re_log/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_log" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_log_types/Cargo.toml b/crates/re_log_types/Cargo.toml index 927126f8c3b3..d18fa90e659e 100644 --- a/crates/re_log_types/Cargo.toml +++ b/crates/re_log_types/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_log_types" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_sdk_comms/Cargo.toml b/crates/re_sdk_comms/Cargo.toml index cf0bfb0ec001..a43d26e92b7f 100644 --- a/crates/re_sdk_comms/Cargo.toml +++ b/crates/re_sdk_comms/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_sdk_comms" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_string_interner/Cargo.toml b/crates/re_string_interner/Cargo.toml index 9c362161096c..976087d18407 100644 --- a/crates/re_string_interner/Cargo.toml +++ b/crates/re_string_interner/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_string_interner" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index 4d6c442f87cc..e7519428cabb 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_viewer" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_web_server/Cargo.toml b/crates/re_web_server/Cargo.toml index 90c4d098edaa..59cd9150a2c8 100644 --- a/crates/re_web_server/Cargo.toml +++ b/crates/re_web_server/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_web_server" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/re_ws_comms/Cargo.toml b/crates/re_ws_comms/Cargo.toml index 76ab6a2d8ea1..2a19b8209e82 100644 --- a/crates/re_ws_comms/Cargo.toml +++ b/crates/re_ws_comms/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "re_ws_comms" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/crates/rerun/Cargo.toml b/crates/rerun/Cargo.toml index d550e7bf10a8..36fce3955f48 100644 --- a/crates/rerun/Cargo.toml +++ b/crates/rerun/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "rerun" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false default-run = "rerun" diff --git a/examples/objectron/Cargo.toml b/examples/objectron/Cargo.toml index d25384e5095d..d70d48e08acc 100644 --- a/examples/objectron/Cargo.toml +++ b/examples/objectron/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "objectron" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false diff --git a/rerun_py/Cargo.toml b/rerun_py/Cargo.toml index 673ab481a750..c6e5360f2f01 100644 --- a/rerun_py/Cargo.toml +++ b/rerun_py/Cargo.toml @@ -1,11 +1,10 @@ [package] -edition = "2021" -license = "MIT OR Apache-2.0" name = "re_sdk_python" # name of the rust crate +edition.workspace = true +license.workspace = true publish = false -rust-version = "1.63" -version = "0.1.0" - +rust-version.workspace = true +version.workspace = true [lib] diff --git a/rerun_py/README.md b/rerun_py/README.md index cef978c6eb1d..a9d0fbf31562 100644 --- a/rerun_py/README.md +++ b/rerun_py/README.md @@ -104,10 +104,10 @@ You can run with `RUST_LOG=debug` to get more output out of the rerun SDK. If you are using an Apple-silicon Mac, make sure `rustc -vV` outputs `host: aarch64-apple-darwin`. If not, this should fix it: ``` sh -rustup set default-host aarch64-apple-darwin && rustup install 1.63 +rustup set default-host aarch64-apple-darwin && rustup install 1.64 ``` If you want to switch back, this is how: ``` sh -rustup set default-host x86_64-apple-darwin && rustup install 1.63 +rustup set default-host x86_64-apple-darwin && rustup install 1.64 ``` diff --git a/rerun_py/requirements-build.txt b/rerun_py/requirements-build.txt index 40ddd3b0867b..9380d17eae35 100644 --- a/rerun_py/requirements-build.txt +++ b/rerun_py/requirements-build.txt @@ -1 +1 @@ -maturin==0.13,<0.14 +maturin==0.13.5,<0.14 diff --git a/rust-toolchain b/rust-toolchain index 0bdf351f38ef..ae1e42e530a8 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -5,6 +5,6 @@ # to the user in the error, instead of "error: invalid channel name '[toolchain]'". [toolchain] -channel = "1.63.0" +channel = "1.64" components = ["rustfmt", "clippy"] targets = ["wasm32-unknown-unknown"] diff --git a/scripts/setup.sh b/scripts/setup.sh index 601ab1adc455..4cc6785ff3bf 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -12,7 +12,7 @@ elif [ -x "$(command -v dnf)" ]; then sudo dnf install clang clang-devel clang fi # Needed to compile and check the code: -rustup install 1.63.0 +rustup install 1.64.0 ./scripts/setup_web.sh ./scripts/build_web.sh # We bake the wasm into some binaries, so we need to build the WASM at least once! From c3ff356e943e2f4718f0f7bdee7572e019b9579b Mon Sep 17 00:00:00 2001 From: John Hughes Date: Tue, 4 Oct 2022 11:44:34 +0200 Subject: [PATCH 2/5] Switched `re_tensor_ops` to inherit package details --- crates/re_tensor_ops/Cargo.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/re_tensor_ops/Cargo.toml b/crates/re_tensor_ops/Cargo.toml index 330f06662519..f07e3086b2d4 100644 --- a/crates/re_tensor_ops/Cargo.toml +++ b/crates/re_tensor_ops/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "re_tensor_ops" -version = "0.1.0" -edition = "2021" -rust-version = "1.63" -license = "MIT OR Apache-2.0" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true publish = false [dependencies] ahash = "0.8" -bytemuck = {version = "1.12", features = ["extern_crate_alloc"]} +bytemuck = { version = "1.12", features = ["extern_crate_alloc"] } ndarray = "0.15" re_log_types = { path = "../re_log_types" } serde = { version = "1", features = ["derive"] } From 8eb078928582f3a9525b7450225a5308647b71d1 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Tue, 4 Oct 2022 12:05:53 +0200 Subject: [PATCH 3/5] - Add clippy to Linux rustup components - Update github workflow actions maturin version to 0.13.5 --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f31925e1d45f..989709addca7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -51,7 +51,7 @@ jobs: profile: minimal toolchain: 1.64.0 override: true - components: rustfmt + components: rustfmt clippy - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev # eframe reqs - name: Set up cargo cache uses: Swatinem/rust-cache@v2 @@ -160,7 +160,7 @@ jobs: # cache: "pip" - uses: messense/maturin-action@v1 with: - maturin-version: "0.13.1" + maturin-version: "0.13.5" command: build args: -m rerun_py/Cargo.toml -o dist @@ -179,6 +179,6 @@ jobs: cache: "pip" - uses: messense/maturin-action@v1 with: - maturin-version: "0.13.1" + maturin-version: "0.13.5" command: build args: -m rerun_py/Cargo.toml -o dist --universal2 From 348e10533d466497024dd27cbacfef49cfde9974 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Tue, 4 Oct 2022 12:43:40 +0200 Subject: [PATCH 4/5] Missing comma --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 989709addca7..575fea1ae9cd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -51,7 +51,7 @@ jobs: profile: minimal toolchain: 1.64.0 override: true - components: rustfmt clippy + components: rustfmt, clippy - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev # eframe reqs - name: Set up cargo cache uses: Swatinem/rust-cache@v2 From aa92b5bde9c149bb0f191912da8786a0c34b5ee4 Mon Sep 17 00:00:00 2001 From: John Hughes Date: Tue, 4 Oct 2022 12:57:31 +0200 Subject: [PATCH 5/5] Fix clippy warnings in `time_control.rs` --- crates/re_viewer/src/misc/time_control.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/re_viewer/src/misc/time_control.rs b/crates/re_viewer/src/misc/time_control.rs index c22229202ce9..7d5a1b111f6d 100644 --- a/crates/re_viewer/src/misc/time_control.rs +++ b/crates/re_viewer/src/misc/time_control.rs @@ -115,7 +115,7 @@ impl Default for TimeControl { impl TimeControl { /// None when not active pub fn active_selection_type(&self) -> Option { - self.selection_active.then(|| self.selection_type) + self.selection_active.then_some(self.selection_type) } /// None when not active