-
Notifications
You must be signed in to change notification settings - Fork 2.6k
wasm: enable new features #10707
Comments
I was looking into this a bit to force enable simd and found paritytech/wasm-instrument#4 is needed before those features can be enabled in Substrate, once that is done, it will be possible to test things with wasmtime by tweaking a just few things. |
As a potential heads up, LLVM is enabling some default features in clang, see here. I assume rustc is soon to follow (if not already). We should be ready for it since one day we might build a runtime that won't pass our checks. As a related note, a similar discussion is happening on the wasmtime side, here bytecodealliance/wasmtime#3969. The consensus is that it does not make sense to perpetually continue supporting these minimal configurations. It's hard to argue with the arguments that are given there, so I think it would be best if we explicitly checked for using those features on our side if needed. That might affect our plans for parity-wasm/wasm-instrument (cc @athei ) cc @koute |
Yeah we need to tackle paritytech/wasm-instrument#3 soon. |
There's always the For x86 clang still supports I think we will probably want to gradually migrate to a newer WASM featureset, but in the short term it shouldn't be a critical issue as long as we force the compiler to not use the newer instructions. |
Yes, Some features like multivalue, mutable globals, signext, and co are good to use since they are natural extensions of wasm. Bulk memory extensions are trickier since, e.g., Given that, I guess the WASM feature set we need won't match |
That still could be relatively easily metered, I think? Indeed it does variable amount of work, but the work it does is simple, and is highly correlated with the size of the memory region it is passed. Although it most likely won't be exactly linear (it won't reach its maximum throughput unless the buffer's big), but we could just weight it differently based on a few different thresholds or something. I think that should be doable as long as we're careful. (e.g. depending on the exact SIMD instructions used to implement those the performance can vary very widely, so we'll have to make sure that this uses what we think it uses) |
Sure, did not mean to say that it is insurmountable. Just that it might introduce complications for metering like as you mentioned with attributing the costs but also potentially introducing edge-cases to the metering itself which may warrant just not implementing the proposal (if the cost/benefit analysis does not look too good). |
For what it's worth, it seems that EDIT: Same for "Non-trapping Float-to-int" and |
Substrate currently rejects runtime that use it because of |
This is a placeholder issue for enabling support of a recently added features into the wasm spec.
Some of these allow leveraging the underlying machine more efficiently and others open up better ways of expressing public API.
Enabling a feature would be just fl
The text was updated successfully, but these errors were encountered: