Indeed @chinedufn is spot on here! The wasm32 means that the address space is 32-bits large, and eventually we'll have wasm64 which means the address space will be 64-bits large (but no one implements this yet).
In theory this target name is largely hidden from you when using wasm-pack as well!
@NateLing To expand on what others have already said: yes there will eventually be a wasm64-unknown-unknown, and there were discussions about adding in things like wasm32-unknown-node, wasm32-unknown-web, etc. (though it's unlikely they'll be added in)
The wasm32-unknown-unknown name is consistent with Rust's existing names for compilation targets. Since Rust supports so many different targets, it's important to have consistent names.
Activity
chinedufn commentedon Oct 24, 2018
My understanding is that the first unknown is the system that you are compiling on, and the second is the system you are targeting.
So you an think of unknown-unknown as
โCompile on almost any machine, run on almost any machineโ
If you look at other targets โunknownโ is commonly used so this is in line with the other targets.
Hope that helps!!
alexcrichton commentedon Oct 24, 2018
Indeed @chinedufn is spot on here! The wasm32 means that the address space is 32-bits large, and eventually we'll have wasm64 which means the address space will be 64-bits large (but no one implements this yet).
In theory this target name is largely hidden from you when using wasm-pack as well!
Pauan commentedon Oct 25, 2018
@NateLing To expand on what others have already said: yes there will eventually be a
wasm64-unknown-unknown
, and there were discussions about adding in things likewasm32-unknown-node
,wasm32-unknown-web
, etc. (though it's unlikely they'll be added in)The
wasm32-unknown-unknown
name is consistent with Rust's existing names for compilation targets. Since Rust supports so many different targets, it's important to have consistent names.If your concern is with the annoyance of typing out
wasm32-unknown-unknown
, you can use wasm-pack, or you can configure Cargo to usewasm32-unknown-unknown
by default:zzz6519003 commentedon Aug 22, 2024
+1 too confusing, should be self-explanatary