Adrian Cole

Results 1423 comments of Adrian Cole

maybe make a code comment about it being different than accept/4? you could also cite the reference impl which seems to only pass only two values as flags: 0 or...

I would recommend against exporting functions that deal with one byte at a time, as that may be the reason why things are getting overloaded. There's an example here of...

Another thing that might help is when you are dealing with memory, the memory is also exported to the host as the name "memory". When you deal with bytes at...

ps the underlying issue seems related to this (is this a dupe @aykevl @dgryski? https://github.com/tinygo-org/tinygo/issues/3019)

Good news. Thanks to @trivigy, there's an example for this. Follow the directions here, except `make slices` instead of `make main` https://github.com/tinygo-org/tinygo/blob/release/src/examples/wasm/README.md I verified this just now. https://github.com/tinygo-org/tinygo/blob/release/src/examples/wasm/slices/wasm.go

my 2p: I think string and []byte could be special cased somehow, though when (if) strings are supported natively in wasm, special rules like this will create ambiguity. I might...

ps above was basically cobbled from https://github.com/tetratelabs/wazero/tree/main/examples/allocation/tinygo but I didn't make the source files arch specific (ex to have SayHello defined in a different source file if target=wasi)

@alexec yeah that actually is a better way to frame it, basically it doesn't currently and even 2.0 (draft) doesn't support strings. You aren't alone in surprise, basically what some...

@alexec I suspect it is ok to close this, as tinygo has limited influence on changing the WebAssembly spec ;)

Is it possible to proceed with this, even if a longer term, larger PR may happen in the future? As probably some notice, there's an increase of people trying and...