Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust update and workspace inheritance #110

Merged
merged 6 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,9 +49,9 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.63.0
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
Expand Down Expand Up @@ -113,7 +113,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
Expand All @@ -136,7 +136,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
Expand All @@ -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

Expand All @@ -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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)).
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
[workspace]
resolver = "2"
members = ["crates/*", "rerun_py"]
[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 # Make debug builds run faster
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://rustup.rs/>
* `git clone [email protected]: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
Expand Down
8 changes: 4 additions & 4 deletions crates/re_data_store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_log/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_log_types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_sdk_comms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_string_interner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
10 changes: 5 additions & 5 deletions crates/re_tensor_ops/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"] }
Expand Down
8 changes: 4 additions & 4 deletions crates/re_viewer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/src/misc/time_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Default for TimeControl {
impl TimeControl {
/// None when not active
pub fn active_selection_type(&self) -> Option<TimeSelectionType> {
self.selection_active.then(|| self.selection_type)
self.selection_active.then_some(self.selection_type)
}

/// None when not active
Expand Down
8 changes: 4 additions & 4 deletions crates/re_web_server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/re_ws_comms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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


Expand Down
8 changes: 4 additions & 4 deletions crates/rerun/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
9 changes: 4 additions & 5 deletions rerun_py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
crate-type = ["cdylib"]
Expand Down
4 changes: 2 additions & 2 deletions rerun_py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,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
```
2 changes: 1 addition & 1 deletion rerun_py/requirements-build.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
maturin==0.13,<0.14
maturin==0.13.5,<0.14
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down