By the way, Node does have fetch support these days, which I'd actually missed, but it's still missing "file:" fetch. As mentioned in the video, Bun and Deno do both work out of the box on the demo as presented, including automatic support for both ES modules & TypeScript.
@arjix8738
2 ай бұрын
Huh, I doubt browsers allow fetching file: either. Node's fetch API is compliant with the browser's fetch API. Same specification and standard
@contextfree
2 ай бұрын
The code is written to be relative to the js module URL. Running from command line here means file. That's all.
@lucatracanna6955
2 ай бұрын
Almost the same situation in C/C++: you either use Emscripten which does most of the job for you OR you do it manually with Clang (which doesn't port the standard library so if you want to use std::vector, std::map etc. you gotta write them yourself). It would be nice to see a video about that too.
@contextfree
2 ай бұрын
My understanding is that emscripten also wraps lots of different libraries. It seems to be a very large scope project.
@contextfree
2 ай бұрын
Also, plain old rust compiling to wasm gets std Vec and most things. It's just the interop part that's awkward without extra tooling, at least for what I've seen so far. So that's also a difference.
@rcelyte
2 ай бұрын
wasi-sdk provides a mostly exhaustive implementation of the C and C++ standard libraries without Emscripten, and works in-browser if you don't depend on platform features like file I/O.
@rcelyte
2 ай бұрын
4:31 Minor correction: DataView getters will *always* use big endian unless `true` is specified, regardless of host endianness.
@contextfree
2 ай бұрын
Thanks much for the correction!
@Germisstucklmao
2 ай бұрын
This is pretty interesting. How complex is webgpu?
@contextfree
2 ай бұрын
Webgpu requires lots of manual and fiddly effort. New Taca plans give less control for a much easier time. And my new js implementation is directly on webgl2. But I'm currently still working on getting wgpu working for the native version.
@Germisstucklmao
2 ай бұрын
Why not use webgpu for the web as well?
@contextfree
2 ай бұрын
It's only available in Chrome and not on Linux. Presumably someday though.
@codeman99-dev
2 ай бұрын
Seems WASM is coming back into general conversation again. Feels like it has been quiet since the announcement of WASM garbage collection. Maybe I stopped paying attention?
@contextfree
2 ай бұрын
To me, that's still a new announcement. I guess I work on a slower time scale. I have looked at the gc spec a little, though.
Пікірлер: 17