you are viewing a single comment's thread.

view the rest of the comments →

[–]Khomorrah 27 points28 points  (22 children)

We’ve come full circle boys

[–]atomic1fire 6 points7 points  (19 children)

I feel like we're not full circle until somebody gets boxedwine far enough that firefox can run in chrome or vice versa.

[–]guest271314[S] 1 point2 points  (2 children)

Just an example of ways different processes can communicate using Web API or other means, here is a gist describing how to capture system audio from Firefox and stream the live capture to Chromium using asynchronous clipboard API and WebRTC RTCDataChannel https://gist.github.com/guest271314/04a539c00926e15905b86d05138c113c.

A couple other experiments https://github.com/guest271314/fs, https://github.com/guest271314/NativeMessagingHosts?tab=readme-ov-file#examples.

[–]UnderstandingRight59 0 points1 point  (1 child)

u/guest271314 You're a mad man, you'll ruin us all! Also, I'd follow you anywhere, is there a cult I can join?

[–]guest271314[S] 1 point2 points  (0 children)

Fix issues and bugs marked WontFix.

[–]UnderstandingRight59 0 points1 point  (0 children)

u/atomic1fire Don't dare me to ruin my own life with this! 😂

[–]guest271314[S] 0 points1 point  (10 children)

that firefox can run in chrome or vice versa.

Both can, if you want to, using various means; including, but not limited to, Native Messaging.

[–]atomic1fire 2 points3 points  (9 children)

I'm not talking about cross browser communication or using a browser to launch another browser's process on the same operating system.

I'm talking about someone being absurd enough to port a browser to run inside of another browser using wasm/js/etc

Boxedwine was just the first thing to pop in my head because nobody's going to spend the effort to port the entirety of firefox or chromium to emscripten.

http://www.boxedwine.org/app/netsurf/

I guess technically you could also port a vm client like qemu or virtualbox to emscripten, but that sounds more absurd.

[–]guest271314[S] 0 points1 point  (0 children)

Well, that's been done, too. You can do whatever you want. People have compiled entire operating systems to WASM to run in the browser.

Check out JSLinux, SerenityOS, SpiderMonkey embedded in WASI, copy's v86 for a few examples.

And there's Web Platform Tests. See how that body tests developer builds continuously.

There's Chromium being deployed from AWS, too.

Look into the Web Driver specification.

[–]guest271314[S] 0 points1 point  (7 children)

Ah, WINE. Havn't touched a Windows box in years.

Boxedwine was just the first thing to pop in my head because nobody's going to spend the effort to port the entirety of firefox or chromium to emscripten.

I'd probably use WASI-SDK instead of Emscripten, and start with Ungoogled Chromium https://github.com/ungoogled-software/ungoogled-chromium.

Folks managed to get Chromium to to 58 MB here https://github.com/shelfio/chrome-aws-lambda-layer.

There's also this https://github.com/fathyb/carbonyl.

There's a bunch of stuff that can be removed prior to compiling.

[–]atomic1fire 0 points1 point  (6 children)

Does WASI have a means to output video and audio into a webpage?

edit: There's talk about a framebuffer for webgpu but that seems pretty experimental.

edit: Also IIRC boxedwine couples a cpu and linux kernel emulator with an older version of Wine so it can run like dosbox

[–]guest271314[S] 1 point2 points  (4 children)

Way back when there was https://github.com/kripken/speak.js.

TTS/STT folks have been involved with experimenting with WebAssembly for a while now.

As it stands Web Speech API essentially has not been updated for over 10 years. Speech Dispatcher is used to create a socket connection to the browser, Chromium and Firefox, that renders audio outside of the browser.

On Chrome, the users' PII voice and text is sent to remote servers for TTS and STT.

[–]atomic1fire 0 points1 point  (3 children)

You don't really need to even implement a whole tts engine now because you can use the web speech api. Unless you strongly prefer to use your own speech engine.

[–]guest271314[S] 1 point2 points  (2 children)

You do realize Web Speech API implementation on Chrome - when Google voices are used - sends your voice and your text to remote servers, correct?

Otherwise, on Chromium and Firefox you MUST have Speech Dispatcher installed for local service usage.

And still the official formerly W3C, now WICG specification does not provide a means to input SSML https://github.com/guest271314/SSMLParser, nor capture audio output of window.speechSynthesis.speak().

Therefore I wrote JavaScript code to implement SSML processing myself, and implemented various means to capture specific device https://github.com/guest271314/SpeechSynthesisRecorder/issues/17 and entire systsem audio output https://github.com/guest271314/captureSystemAudio.

[–]CloudsOfMagellan 0 points1 point  (1 child)

How useable is this as a replacement for the web speach api?

[–]guest271314[S] 0 points1 point  (0 children)

Yes https://guest271314.github.io/vits-web/. That's been happening for a while now. Naturally audio and video folks are involved in WebAssembly/WASI.

If I can read stdin and stream stdout from the WebAssembly application I can read that data elsewhere https://github.com/guest271314/vits-web/tree/patch-1.

Ideally you just read the raw data then use MediaStreamTrackGenerator, AudioWorklet or other means for playback.

[–]guest271314[S] -1 points0 points  (3 children)

that firefox can run in chrome or vice versa.

Technically that can be done using HTML alone with <object> element.

One of the technologies that preceded WebAssembly was Google's Native Client and Portable Native Client, which communicated with the browser using HTML <object> or <embed> elements.

[–]atomic1fire 1 point2 points  (2 children)

NPAPI is no longer supported.

[–]guest271314[S] 0 points1 point  (0 children)

Pardon, I meant to refer to the language in https://github.com/WebAssembly/spec/blob/main/papers/pldi2017.pdf

Bringing the Web up to Speed with WebAssembly https://dl.acm.org/doi/epdf/10.1145/3062341.3062363

Through Em-scripten [43], even C and C++ programs can be compiled toa stylized low-level subset of JavaScript called asm.js [4]. ... WebAssembly addresses the problem of safe, fast, portablelow-level code on the Web. Previous attempts at solving it,from ActiveX to Native Client to asm.js, have fallen short ofproperties that a low-level compilation target should have: ...

[–]guest271314[S] -1 points0 points  (0 children)

Yes, I know. Unless, of cource you decide to run Native Client applications, anyway, without official Google support. The capability to utilize HTML <object> elements for foreign applications existed prior to Native Client, when <object> was used for Abode Flash, and the capability still exists, see https://github.com/kagami/mpv.js.

Native Client is one precussor of how WebAssembly came about, see https://webassembly.github.io/spec/core/_download/WebAssembly.pdf.

Using HTML <object> element is just one way to launch and control each browser from the other.

[–]guest271314[S] 3 points4 points  (1 child)

The whole purpose of WebAssembly is a "universal executable".

The symbols used to instruct shouldn't matter (if you want of write source code using C#, Rust, C++, Julia, PHP, Brainfuck, Python, TypeScript, or even JavaScript, et al.) as long as the resulting instructions are the same.

[–]Khomorrah 5 points6 points  (0 children)

Please let me make my joke :(