Ingvar Stepanyan

Results 1089 comments of Ingvar Stepanyan

> Of course doing such a thing can be dangerous (which is why view is unsafe). But, it can be done, and I'm sure people are doing it in hot...

> There's a lot of variance between runs because I have no idea how to write a good micro benchmark for the browser The common go-to library is Benchmark.js (that's...

> Host bindings have support for directly passing UTF-8 strings, which (hopefully) will avoid encoding/decoding. Ah interesting. Need to see how it's going to become implemented, but sounds promising if...

Hi, I'm a WebAssembly DevRel at Google and thought I'd chime as I've actively worked with both Rust (including wasm-bindgen) and Emscripten at various points. Admittedly, this is a simple...

I can't say much about cargo-web TBH because while I've seen it, personally never used it. In example above you can see that I'm just using regular `cargo build` command...

> When you compile any c library that uses standard headers like stdio.h or string.h you get compilation errors. Yeah that's true, for that you need some minimal stdlib and...

> Well, i just tried to build imgui-rs to wasm32-wasi, and i get exactly the same errors about not having string.h and friends :) That's weird, wasm32-wasi definitely has these...

> So does Emscripten, for that matter. Yeah but the difference is that Emscripten also generates surrounding runtime JS code, which we explicitly don't need or want in this case,...

> The only way to mix Rust and C code when targeting WebAssembly is to use the wasm32-unknown-emscripten target. You cannot use wasm-bindgen when you do that because wasm-bindgen is...

Here's a slightly modified variation of my example above, that uses wasm-bindgen instead of Emscripten for JS interactions, but still combines Rust + C in the same way: ![image](https://user-images.githubusercontent.com/557590/84926254-02c81600-b0c3-11ea-9712-85a01afec635.png)