#Check if a target is supported

8 messages · Page 1 of 1 (latest)

torpid summit
#

Is there an easy way to see if a crate is compatible with wasm32-unknown-unknonn target? I am starting a new project that needs webassembly and I want to see which crates I can use.

quiet swallow
#

not an easy way

#
  • if it's a no_std crate then it probably is, but that's not common
  • if it needs filesystem, threads, or time, and it isn't specifically noting wasm compatibility then it probably doesn't
  • most libraries that are just algorithms 'n' data structures, not caring about the outside world, are compatible
torpid summit
quiet swallow
#

yes

torpid summit
#

just to test if it works

midnight kestrel
#

You should see it just by adding it to Cargo.toml, and then building the project. IIRC you shouldn't have to actually use anything from the crate.