Stream: general

Topic: ✔ wit-bindgen-gen-rust-wasm seems to generate broken code


view this post on Zulip handicraftsman (Dec 11 2021 at 18:48):

Hi, for WIT like below:

resource Task {
  execute: function()
}

Is it okay that wit-bindgen-gen-rust-wasm generates broken code? (rustc screams at it with errors)
It is mostly screaming about trait references not having dyn keyword, etc.

view this post on Zulip handicraftsman (Dec 11 2021 at 18:50):

Let me send cargo/rustc logs
https://www.toptal.com/developers/hastebin/bemanikogi.log

view this post on Zulip handicraftsman (Dec 11 2021 at 18:52):

Running it in export mode

view this post on Zulip bjorn3 (Dec 11 2021 at 19:39):

Does it work if you use the 2018 edition of rust instead of 2021? Trait object without dyn had been deprecated in the 2018 edition and removed in the 2021 edition.

view this post on Zulip handicraftsman (Dec 11 2021 at 20:30):

This was my misunderstanding, sorry - I thought the declarations can be freestanding

view this post on Zulip Notification Bot (Dec 11 2021 at 20:30):

handicraftsman has marked this topic as resolved.


Last updated: Oct 23 2024 at 20:03 UTC