rerun-io / rerun

Visualize streams of multimodal data. Free, fast, easy to use, and simple to integrate. Built in Rust.
https://rerun.io/
Apache License 2.0
6.54k stars 332 forks source link

Remove dependency: `cargo-run-wasm` #5998

Open emilk opened 6 months ago

emilk commented 6 months ago

cargo-run-wasm seems like a dead crate, with no updates in the last year. It pulls in old dependencies, causing warning on cargo-deny:

error[unmaintained]: safemem is unmaintained
    ┌─ Cargo.lock:497:1
    │
497 │ safemem 0.3.3 registry+https://github.com/rust-lang/crates.io-index
    │ ------------------------------------------------------------------- unmaintained advisory detected
    │
    = ID: RUSTSEC-2023-0081
    = Advisory: https://rustsec.org/advisories/RUSTSEC-2023-0081
    = The latest crates.io release was in 2019. The repository has been archived by the author.

      ## Migration

      - `safemem::copy_over(slice, src_idx, dest_idx, len);` can be replaced with `slice.copy_within(src_idx..src_idx+len, dest_idx);` as of `rust 1.37.0`.
      - `safemem::write_bytes(slice, byte);` can be replaced with `slice.fill(byte);` as of `rust 1.50.0`
      - `safemem::prepend(slice, vec);` can be replaced with

        ```rust
        let old_len = vec.len();
        vec.extend_from_slice(slice);
        vec.rotate_left(old_len);
    as of `rust 1.26.0`
= Announcement: https://github.com/abonander/safemem
= Solution: No safe upgrade is available!
= safemem v0.3.3
  └── base64 v0.9.3
      └── wasm-bindgen-cli-support v0.2.90
          ├── cargo-run-wasm v0.3.2
          │   └── run_wasm v0.16.0-alpha.1+dev
          └── re_dev_tools v0.16.0-alpha.1+dev
Wumpf commented 6 months ago

we use it to run re_renderer examples on the web right now. It shouldn't be too hard to figure out some other way to do so conveniently

KMJ-007 commented 3 months ago

hey i would like to work on this

but from the readme, I found this

This is a temporary solution while we're in the process of building our own `xtask` tools.

so, i am little confused, how can i contribute?

Wumpf commented 3 months ago

great to hear you want to help out! :) The task here is to remove cargo run-wasm in favor of some other solution that allows running re_renderer's examples easily on the web (that's the only thing we use run-wasm for right now)

KMJ-007 commented 3 months ago

i am thinking about wasm-pack, which is more popular and maintained,

but thinking about what would be the great dx, cuz wasm-pack requires to build first and then run it, where run-wasm was straight forward single command which was no-brainer

but will need to create wrapper around it

there is another option also to use something like trunk

what do you think and suggest?

emilk commented 3 months ago

wasm-pack requires to build first and then run it

That's fine, we can always add a command in pixi.toml to do one after the other

what do you think and suggest?

I don't know :) Something simple, with few dependencies