2

First of all, I'm newby in rust and webassembly. I'd like to use Reference Types with wasm-bindgen, following theexample in wasm-bindgen book Support for Reference Types

I've tried to build my code with the reference types flag

wasm-pack build --reference-types

But I'm getting following error

error: Found argument '--reference-types' which wasn't expected, or isn't valid in this context

I've installed rustc with version 1.55 and wasm-pack with version 0.10.1.

Am I missing any thing?

Daní
  • 355
  • 1
  • 17
  • 2
    Could seem like `wasm-pack` don't support `--reference-types`, but `wasm-bindgen-cli` (https://rustwasm.github.io/docs/wasm-bindgen/reference/cli.html#--reference-types)` does. Only use `wasm-pack`, but think similar could be obtained with `wasm-bindgen-cli` command. – Jonas Bojesen Sep 16 '21 at 15:38
  • Thanks @JonasBojesen. It seems I have to use wasm-bindgen command after building with wasm-pack. Still i'0m getting some error. Guess I need some more ork/research – Daní Sep 16 '21 at 16:29

0 Answers0