Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
csomar
· 3y ago · 0 comments
Will there be any support for Wasm as a target for compilation?
Comments
[–]
rusbus
3y ago
Yep! There are actually examples that use Web Assembly:
https://github.com/awslabs/aws-sdk-rust/tree/main/examples/w...
[–]
csomar
OP
3y ago
So is there an indication/documentation which packages are wasm-supported or is this a kind of try and find out type of situation?
[–]
jupp0r
3y ago
Why would this be specific to the SDK? If the code is Rust without any native libraries being linked, WASM should work out of the box.
[–]
rusbus
3y ago
Although this is true in theory, in practice you need to be very careful when writing code if you want to target WASM. One example: `SystemTime::now` will panic on some WASM platforms!
[–]
jupp0r
3y ago
True, but library authors shouldn't work around those bugs. It just creates a whole lot of unnecessary legacy code in the wrong places.
[–]
csomar
OP
3y ago
I wish this was true but it isn't.