Open
Description
From wingo/stringrefs#35, if we think about a browser deployment environment, we would like to avoid a situation in which two parts of a running system are implementing toUpperCase
on a JavaScript string. If WebAssembly needs this or related string functionality, it should be able to use what's already in the browser.
So what's the story here? A couple options:
- Wild west: if you know you're targetting a browser, generate an associated JS wrapper that calls the
String.prototype
orIntl.prototype
functions that you need - Standard library: Regardless if you're targetting WASI or the web, you know there is a standard module you can import that provides the functionality you need. On the web, such a module delegates to
String
,Intl
, and so on. - Core: There is a
string.to_upper
instruction. Lots more, probably.
I have to say, I see (1) as an OK short-term answer and (2) as a nice end result. I wouldn't do (3) but who knows!
Metadata
Metadata
Assignees
Labels
No labels