design-principles
stringref
design-principles | stringref | |
---|---|---|
4 | 2 | |
158 | 34 | |
2.5% | - | |
6.7 | 0.0 | |
10 days ago | about 1 year ago | |
Bikeshed | WebAssembly | |
- | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
design-principles
-
The Risks of WebAssembly
I am skeptical of WebAssembly and component-model myself, but that AssemblyScript page seems alarmist and as can be seen in several issues, dcodeIO (from the AssemblyScript community) was definitely not behaving in good faith: https://github.com/w3ctag/design-principles/issues/322
It seems most of the complaints are that selecting UTF-8 as a primary string encoding is "against the practices of the web", which seems patently absurd. I was definitely expecting more along the lines of object models integrating into componentāmodel, rather than mass-tagging people because of string encodings.
- Do not design around third-party tools unless it breaks the Web
- New principle: Do not design around 3rd party tools unless it breaks the Web
-
An Urgent Notice from AssemblyScript
I don't agree with your representation that sanitisation of isolated surrogates constitutes "corruption". As a high-level point, when passing a string from your component to an external one, the external component receives a sanitised copy of your string - the original string is not modified in-place. So you still have access to your original string if you're relying on the presence of isolated surrogates for some reason.
For fairness, I will link below to your concrete example of "corruption", noting that you claim it will render Wasm "the biggest security disaster man ever created for everything". The fundamental bug is in splitting a string at a point which happens to be between two code points which make up an emoji. This kind of mistake can already cause logic and display errors in other parts of the code (e.g. for languages with non-BMP characters) independent of whether components are involved.
https://github.com/w3ctag/design-principles/issues/322
stringref
-
Extism Makes WebAssembly Easy
The idea of Wasm as a universal plugin system is very promising. But string passing is maybe not the best example to highlight, considering that Wasm is introducing stringref to enable zero-copy string sharing between the Wasm runtime and host language.
https://github.com/WebAssembly/stringref/blob/main/proposals...
-
The Risks of WebAssembly
> dcodeIO (from the AssemblyScript community) was definitely not behaving in good faith
I certainly disagree with that take. I only see one person being frustrated because his concerns were being thrown under the rug as "non important", I would recommend you to read on dcode's blog to learn more about how the timeline happened [1]. There are always things to improve regarding how we communicate, of course, but those should not be used as a weapon to attack or dismiss someone but as means to improve.
It's also important to note that a few months after, the Wasm committee realized of the mistake and actually tried to solve it with the Wasm Stringref proposal [2].
The issue is not about if using UTF-8 or UTF-16 is the way to go, but how disagreement is being handled in what's supposed to be an open community
[1] https://dcode.io/#webassembly
[2] https://github.com/WebAssembly/stringref
What are some alternatives?
assemblyscript - A TypeScript-like language for WebAssembly.
modsurfer - Devtools to validate, audit and investigate WebAssembly binaries.
interface-types
js-string-builtins - JS String Builtins
component-sandbox-demo
crypto - Cryptographic operations in WASM, C, Typescript for Nodejs and the browser.
memory-control - A proposal to introduce finer grained control of WebAssembly memory.
awesome-wasm-runtimes - A list of webassemby runtimes
AnswerOverflow - Indexing Discord Help Channel Questions into Google
jco - JavaScript tooling for working with WebAssembly Components
wit-bindgen - A language binding generator for WebAssembly interface types
memory64 - Memory with 64-bit indexes