Support component model `map<K, V>`

Open
#344 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust, wasm
Domain
tooling

Research direction

Start in crates/spidermonkey-embedding-splicer/src/bindgen.rs at line 857 and reproduce the panic with a WIT interface importing map<K, V>. Trace the bindgen path reached by that input and use RUST_BACKTRACE=1 if needed. Done means ComponentizeJS handles the component-model map type without the unreachable-code panic.

Written by the indexing model from the issue text.

Description

A while back the component model introduced map<K, V> (https://github.com/WebAssembly/component-model/pull/554). I have a WIT interface which imports this, which I think might be the cause for the following ComponentizeJS panic:

thread '<unnamed>' (1) panicked at crates/spidermonkey-embedding-splicer/src/bindgen.rs:857:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
An error occured while building the WASI component: RuntimeError: unreachable

https://github.com/bytecodealliance/ComponentizeJS/blob/12c2b4a25033f65047f8ec5c5fb9e3013bfc4950/crates/spidermonkey-embedding-splicer/src/bindgen.rs#L857

Dominant language
Rust
Stars
392
Forks
54
Avg merge
2d 18h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bytecodealliance/ComponentizeJS

All issues in bytecodealliance/ComponentizeJS

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.