Live data from Hacker News

Running WASI binaries from your HTML using Web Components

runno.dev

21–30 of 73 posts

Re: Running WASI binaries from your HTML using Web Components

#22
post #2

G’day, if anyone has any questions about this I’m happy to answer them here.

What a novel way to integrate a bunch of web technologies! It makes me much more interested in using WASM.

Thanks! Yeah WebAssembly has an exciting future ahead of it.

Re: Running WASI binaries from your HTML using Web Components

#23
post #15

Earlier quoted context omitted.

I tried this in your Python example: import sqlite3 >>> db = sqlite3.connect("data.db") Traceback (most recent call last): File " ", line 1, in sqlite3.OperationalError: unable to open database file Presumably that operation failed because there isn't a writable virtual filesystem. Would it be possible to provide one?

You just need to create the file first! >>> open("data.db", "w+").close() >>> db = sqlite3.connect("/data.db") >>> db

Oh cool!

Regular Python doesn't need me to create the file first, I wonder why this works differently.

Re: Running WASI binaries from your HTML using Web Components

#24
post #23

Earlier quoted context omitted.

You just need to create the file first! >>> open("data.db", "w+").close() >>> db = sqlite3.connect("/data.db") >>> db

Oh cool! Regular Python doesn't need me to create the file first, I wonder why this works differently.

Might be this particular build of Python, or might be that I implemented one of the `fd` functions in a way Python/SQlite is surprised by. I'll have a look into it some time!

Re: Running WASI binaries from your HTML using Web Components

#25

I get "Runno crashed: ReferenceError: SharedArrayBuffer is not defined" in every component.

Is this on the blog post, or are you trying it out yourself? If it's on the blog post, it sounds like your browser doesn't support `SharedArrayBuffer` ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... ) or you've disabled Cross Origin Isolation somehow. It might be because you have an old browser (there was a period where it was disabled) or you have disabled Cross Origin Isolation yourself (maybe a s…

Same here - using mobile chromium on android.

Re: Running WASI binaries from your HTML using Web Components

#26
Very slick and opens up so many possibilities.

WebAssembly, WASI, like WebRTC/WebGPU/WebXR/WebAudio, just makes webdev, gamedev + native/networking very very interesting in this phase of technology where js frameworks are culty bloated/verbose and apps are the main thing for marketing/tools. Web apps + tools are opening up with wasm/wasi.

Runno (https://runno.dev/ + https://runno.dev/wasi) is a great idea and helps make interesting native stuff in a sandbox locally. Running all this directly without having to mash into assembly is a great idea. Awesome job on this!

> Runno helps you make runnable code examples that can be embedded in web pages. This is very handy for educational tools, it means:

> - You can make code examples that don't need users to install scary tools.

> - No need to run a server, it all runs client-side in the browser.

> - Your users can edit and re-run any code examples you make.

> - The examples are extremely customisable with HTML, CSS and JavaScript!

Re: Running WASI binaries from your HTML using Web Components

#27

Very slick and opens up so many possibilities. WebAssembly, WASI, like WebRTC/WebGPU/WebXR/WebAudio, just makes webdev, gamedev + native/networking very very interesting in this phase of technology where js frameworks are culty bloated/verbose and apps are the main thing for marketing/tools. Web apps + tools are opening up with wasm/wasi. Runno ( https://runno.dev/ + https://runno.dev/wasi ) is a great idea and helps…

Yet I am still waiting to see a game with the same capabilities of Infinity Blade, that Apple used in 2011, as an example of a game showing of the newly acquired OpenGL ES 3.0 capabilities of iDevices.

Or the Unreal Engine 3.0 citadel demo, also in 2011, for Flash/CrossBridge.

It seems the only thing usable is running ShaderToy demos, and 3D views on ecommerce sites.

Re: Running WASI binaries from your HTML using Web Components

#28
post #23

Earlier quoted context omitted.

Oh cool! Regular Python doesn't need me to create the file first, I wonder why this works differently.

Might be this particular build of Python, or might be that I implemented one of the `fd` functions in a way Python/SQlite is surprised by. I'll have a look into it some time!

Maybe just the missing leading slash in the original reproducer? :)

Re: Running WASI binaries from your HTML using Web Components

#29
post #27

Very slick and opens up so many possibilities. WebAssembly, WASI, like WebRTC/WebGPU/WebXR/WebAudio, just makes webdev, gamedev + native/networking very very interesting in this phase of technology where js frameworks are culty bloated/verbose and apps are the main thing for marketing/tools. Web apps + tools are opening up with wasm/wasi. Runno ( https://runno.dev/ + https://runno.dev/wasi ) is a great idea and helps…

Yet I am still waiting to see a game with the same capabilities of Infinity Blade, that Apple used in 2011, as an example of a game showing of the newly acquired OpenGL ES 3.0 capabilities of iDevices. Or the Unreal Engine 3.0 citadel demo, also in 2011, for Flash/CrossBridge. It seems the only thing usable is running ShaderToy demos, and 3D views on ecommerce sites.

That expectation is off by nearly a decade. WASM games in terms of performance are closer to 2000 than 2010. Here's an open source indie game from 2003 that I ported to WASM [1]. It struggles to hit 60 FPS on devices that were released a good 15 years after the game itself. Browsers sometimes struggle to animate simple lines at 60 FPS still to this day, because they're just hugely massive platforms with thousands of moving parts with no room for big, complex apps on top of them.

[1] https://neverball.github.io/

Post reply on HN