Live data from Hacker News

Running WASI binaries from your HTML using Web Components

runno.dev

11–20 of 73 posts

Re: Running WASI binaries from your HTML using Web Components

#11
post #6
post #5

website not loading for me

It's a bit temperamental on some browsers sorry (I've seen it fail on Arc). I implemented my own front-end router and I have done a bad job. I've seen it work today on Chrome, Firefox and Safari.

Not working on chrome here

Re: Running WASI binaries from your HTML using Web Components

#12

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 security setting?).

Re: Running WASI binaries from your HTML using Web Components

#15
post #2

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

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?

Re: Running WASI binaries from your HTML using Web Components

#17
post #15
post #2

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

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
    

Re: Running WASI binaries from your HTML using Web Components

#20
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.

I can imagine how a new style of web-only terminals be possible. The filesystem is realistically _any_ url, and you can load any wasi programs (via a shell, which is also just another wasi program).

I wonder if this is practical, or just a gimmicky way to use a computer...

Post reply on HN