diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9eccacdfc7ae..175f0329942a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,142 +10,6 @@ env: RUSTDOCFLAGS: -D warnings jobs: - check_all_features: - name: Check --all-features - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - uses: actions-rs/cargo@v1 - with: - command: check - args: --all-features --locked - - check_no_features: - name: Check --no-default-features - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - uses: actions-rs/cargo@v1 - with: - command: check - args: --no-default-features --features __ci --lib - - check_wasm: - name: Check wasm32 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - run: rustup target add wasm32-unknown-unknown - - uses: actions-rs/cargo@v1 - with: - command: check - args: -p re_viewer --all-features --lib --target wasm32-unknown-unknown - - test: - name: Test Suite - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features --lib - - fmt: - name: Rustfmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get install libgtk-3-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev - - run: rustup component add rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - cranky: - name: cargo cranky - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: sudo apt-get update && sudo apt-get install libgtk-3-dev - - run: cargo install cargo-cranky - - uses: actions-rs/cargo@v1 - with: - command: cranky - args: --workspace --all-targets --all-features -- -D warnings - - cargo-deny: - name: cargo deny - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: cargo install cargo-deny - - run: cargo deny check - - # For some reason this causes weird problems: - # https://github.com/rerun-io/rerun/runs/6271778805?check_suite_focus=true - # Error: -03 10:39:38 [ERROR] `cargo metadata` exited with an error: info: syncing channel updates for '1.60.0-x86_64-unknown-linux-musl' - # failed to read `/github/rerun/web_server/Cargo.toml` - # cargo-deny: - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: EmbarkStudios/cargo-deny-action@v1 - - wasm_bindgen: - name: wasm-bindgen - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.62.0 - override: true - - run: rustup target add wasm32-unknown-unknown - - run: ./crates/re_viewer/setup_web.sh - - run: ./crates/re_viewer/wasm_bindgen_check.sh - maturin-linux: name: Maturin Linux runs-on: ubuntu-latest @@ -162,53 +26,3 @@ jobs: with: name: wheels path: dist - - maturin-windows: - name: Maturin Windows - runs-on: windows-latest - steps: - - uses: actions/checkout@v3 - - uses: messense/maturin-action@v1 - with: - maturin-version: "0.12.20" - command: build - args: -m crates/re_sdk_python/Cargo.toml --release --no-sdist -o dist - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - maturin-macos: - name: Maturin MacOS - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - uses: messense/maturin-action@v1 - with: - maturin-version: "0.12.20" - command: build - args: -m crates/re_sdk_python/Cargo.toml --release --no-sdist -o dist --universal2 - - name: Upload wheels - uses: actions/upload-artifact@v2 - with: - name: wheels - path: dist - - maturin-release: - name: Maturin Release - runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/')" - needs: [maturin-macos, maturin-windows, maturin-linux] - steps: - - uses: actions/download-artifact@v2 - with: - name: wheels - - name: Publish to PyPI - uses: messense/maturin-action@v1 - env: - MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - with: - maturin-version: "0.12.20" - command: upload - args: -m crates/re_sdk_python/Cargo.toml --skip-existing * diff --git a/Cargo.lock b/Cargo.lock index a18c409616bc..b416073550ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,9 +324,9 @@ checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "bytemuck" -version = "1.9.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdead85bdec19c194affaeeb670c0e41fe23de31459efd1c174d049269cf02cc" +checksum = "a5377c8865e74a160d21f29c2d40669f53286db6eab59b88540cbb12ffc8b835" dependencies = [ "bytemuck_derive", ] @@ -2839,6 +2839,8 @@ dependencies = [ name = "re_sdk_python" version = "0.1.0" dependencies = [ + "bytemuck", + "itertools", "nohash-hasher", "numpy", "once_cell", @@ -2846,6 +2848,7 @@ dependencies = [ "pyo3-build-config", "re_log_types", "re_sdk_comms", + "re_viewer", "tracing", "tracing-subscriber", ] diff --git a/crates/re_sdk_python/Cargo.toml b/crates/re_sdk_python/Cargo.toml index 15fd88ab3288..270f32a865c5 100644 --- a/crates/re_sdk_python/Cargo.toml +++ b/crates/re_sdk_python/Cargo.toml @@ -23,7 +23,10 @@ default = ["extension-module"] [dependencies] re_log_types = { path = "../re_log_types" } re_sdk_comms = { path = "../re_sdk_comms", features = ["client"] } +re_viewer = { path = "../re_viewer", optional = true } +bytemuck = { version = "1.11", features = ["extern_crate_alloc"] } +itertools = "0.10" nohash-hasher = "0.2" numpy = "0.16" once_cell = "1.12" diff --git a/crates/re_sdk_python/requirements.txt b/crates/re_sdk_python/requirements.txt index d14f0ce891a4..df03046daf34 100644 --- a/crates/re_sdk_python/requirements.txt +++ b/crates/re_sdk_python/requirements.txt @@ -1,2 +1,3 @@ maturin +numpy opencv-python