Stream: git-wasmtime

Topic: wasmtime / Issue #2055 wiggle: anonymous struct members


view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

abrown labeled Issue #2055:

While investigating in #2050, I discovered that if I wrote (field $data (array u8)) inside a witx struct then I would receive the following error:

  2    │        error: proc macro panicked
   3   │  --> crates/wasi-common/src/wasi.rs:6:1
   4   │   |
   5   │ 6 | / wiggle::from_witx!({
   6   │ 7 | |     witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx", "WASI/phases/ephemeral/witx/wasi_ephemeral_nn.witx"],
   7   │ 8 | |     ctx: WasiCtx,
   8   │ 9 | | });
   9   │   | |___^
  10   │   |
  11   │   = help: message: not implemented: other anonymous struct members: Value(Array(Value(Builtin(U8))))

(I added more verbose error messaging in e4abc2f to understand what was failing). I can avoid this error by adding a layer of indirection--(typename $tensor_data (array u8)) and then (field $data $tensor_data)--but that was not immediately apparent to me :big_smile:.

Two questions:

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

abrown labeled Issue #2055:

While investigating in #2050, I discovered that if I wrote (field $data (array u8)) inside a witx struct then I would receive the following error:

  2    │        error: proc macro panicked
   3   │  --> crates/wasi-common/src/wasi.rs:6:1
   4   │   |
   5   │ 6 | / wiggle::from_witx!({
   6   │ 7 | |     witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx", "WASI/phases/ephemeral/witx/wasi_ephemeral_nn.witx"],
   7   │ 8 | |     ctx: WasiCtx,
   8   │ 9 | | });
   9   │   | |___^
  10   │   |
  11   │   = help: message: not implemented: other anonymous struct members: Value(Array(Value(Builtin(U8))))

(I added more verbose error messaging in e4abc2f to understand what was failing). I can avoid this error by adding a layer of indirection--(typename $tensor_data (array u8)) and then (field $data $tensor_data)--but that was not immediately apparent to me :big_smile:.

Two questions:

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

abrown opened Issue #2055:

While investigating in #2050, I discovered that if I wrote (field $data (array u8)) inside a witx struct then I would receive the following error:

  2    │        error: proc macro panicked
   3   │  --> crates/wasi-common/src/wasi.rs:6:1
   4   │   |
   5   │ 6 | / wiggle::from_witx!({
   6   │ 7 | |     witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx", "WASI/phases/ephemeral/witx/wasi_ephemeral_nn.witx"],
   7   │ 8 | |     ctx: WasiCtx,
   8   │ 9 | | });
   9   │   | |___^
  10   │   |
  11   │   = help: message: not implemented: other anonymous struct members: Value(Array(Value(Builtin(U8))))

(I added more verbose error messaging in e4abc2f to understand what was failing). I can avoid this error by adding a layer of indirection--(typename $tensor_data (array u8)) and then (field $data $tensor_data)--but that was not immediately apparent to me :big_smile:.

Two questions:

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

abrown labeled Issue #2055:

While investigating in #2050, I discovered that if I wrote (field $data (array u8)) inside a witx struct then I would receive the following error:

  2    │        error: proc macro panicked
   3   │  --> crates/wasi-common/src/wasi.rs:6:1
   4   │   |
   5   │ 6 | / wiggle::from_witx!({
   6   │ 7 | |     witx: ["WASI/phases/snapshot/witx/wasi_snapshot_preview1.witx", "WASI/phases/ephemeral/witx/wasi_ephemeral_nn.witx"],
   7   │ 8 | |     ctx: WasiCtx,
   8   │ 9 | | });
   9   │   | |___^
  10   │   |
  11   │   = help: message: not implemented: other anonymous struct members: Value(Array(Value(Builtin(U8))))

(I added more verbose error messaging in e4abc2f to understand what was failing). I can avoid this error by adding a layer of indirection--(typename $tensor_data (array u8)) and then (field $data $tensor_data)--but that was not immediately apparent to me :big_smile:.

Two questions:

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

github-actions[bot] commented on Issue #2055:

Subscribe to Label Action

cc @kubkon

<details>
This issue or pull request has been labeled: "wasi"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2020 at 17:36):

abrown commented on Issue #2055:

cc: @kubkon, @pchickey, @sunfishcode

view this post on Zulip Wasmtime GitHub notifications bot (Jul 27 2020 at 22:24):

pchickey commented on Issue #2055:

Thanks for this bug report - this is something we should be able to support, but haven't made the effort to do. I'll see if I can get to it in the next few days.


Last updated: Dec 23 2024 at 13:07 UTC