Тёмный

JS to Rust WebAssembly the hard way ... and the easy way 

Context Free
Подписаться 23 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

13 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@contextfree
@contextfree 2 месяца назад
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
@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
@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
@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
@contextfree 2 месяца назад
My understanding is that emscripten also wraps lots of different libraries. It seems to be a very large scope project.
@contextfree
@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
@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
@rcelyte 2 месяца назад
4:31 Minor correction: DataView getters will *always* use big endian unless `true` is specified, regardless of host endianness.
@contextfree
@contextfree 2 месяца назад
Thanks much for the correction!
@Germisstucklmao
@Germisstucklmao 2 месяца назад
This is pretty interesting. How complex is webgpu?
@contextfree
@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
@Germisstucklmao 2 месяца назад
Why not use webgpu for the web as well?
@contextfree
@contextfree 2 месяца назад
It's only available in Chrome and not on Linux. Presumably someday though.
@codeman99-dev
@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
@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.
@stevenhe3462
@stevenhe3462 2 месяца назад
🌮🌮🌮  🦀
Далее
The Truth about Rust/WebAssembly Performance
29:47
Просмотров 182 тыс.
Why I Chose Rust Over Zig
33:18
Просмотров 188 тыс.
When Khabib dropped Conor McGregor 👀 #nocommentary
00:59
Grand Final | IEM RIO 2024 | BO5 | КРNВОЙ ЭФИР
6:35:24
Use Arc Instead of Vec
15:21
Просмотров 148 тыс.
Node.js is a serious thing now… (2023)
8:18
Просмотров 653 тыс.
Rust: When C Code Isn't Enough
8:26
Просмотров 169 тыс.
From Zero to Async in Embedded Rust
1:02:06
Просмотров 23 тыс.
Porffor: Compile Your JavaScript To WebAssembly
20:49
Java Is Better Than Rust
42:14
Просмотров 281 тыс.
why am i building this?
8:37
Просмотров 26 тыс.
Linus Torvalds: Speaks on Hype and the Future of AI
9:02
The Most Important Design Pattern in React
35:04
Просмотров 72 тыс.