rerun icon indicating copy to clipboard operation
rerun copied to clipboard

Remove dependency: `cargo-run-wasm`

Open emilk opened this issue 1 year ago • 5 comments

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

emilk avatar Apr 17 '24 07:04 emilk

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

Wumpf avatar Apr 17 '24 07:04 Wumpf

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?

KMJ-007 avatar Jul 20 '24 13:07 KMJ-007

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)

Wumpf avatar Jul 21 '24 17:07 Wumpf

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?

KMJ-007 avatar Jul 25 '24 18:07 KMJ-007

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

emilk avatar Aug 05 '24 10:08 emilk