TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Unix in the Browser Tab

314 pointsby ezzatoover 3 years ago

17 comments

nteonover 3 years ago
I&#x27;m one of the authors - its so exciting to see continued interest here!<p>The biggest problem with Browsix today stems from Spectre mitigations: Shared Array Buffers aren&#x27;t enabled by default in browsers, and static hosting sites like GitHub Pages don&#x27;t let you set the right COOP&#x2F;COEP ( <a href="https:&#x2F;&#x2F;web.dev&#x2F;coop-coep&#x2F;" rel="nofollow">https:&#x2F;&#x2F;web.dev&#x2F;coop-coep&#x2F;</a> ) headers to get them enabled AFAICT.<p>Additionally, Browsix hasn&#x27;t been updated in a while, although I still believe the idea is sound. I don&#x27;t have a lot of time for Browsix these days, but it would be straightforward to update Browsix with WASI support which would free us from having to use a modified Emscripten toolchain (and instantly enable running Rust binaries under Browsix).<p>[edit]: for additional context: we use Shared Array Buffers to give the kernel and program a shared view of a process&#x27;s address space to enable fast system calls between Web Workers and the kernel (running in the main browser thread&#x2F;context). Without them performance is unacceptably slow, as things like read&#x2F;write system calls (a) require several memcpys and (b) create a bunch of JS garbage. Additionally, without them there isn&#x27;t a good way to &quot;block&quot; handling a syscall in a WebWorker (which we need to do for non-event-loop C&#x2F;C++&#x2F;Rust programs).
评论 #29829743 未加载
评论 #29829265 未加载
评论 #29835920 未加载
评论 #29832699 未加载
arturventuraover 3 years ago
Wow I&#x27;m literally implementing this right now!!<p>I was stuck at parents for xmas and I picked Tannenbaum “distributed systems” and “Modern operating systems”, which gave me an idea of running a &quot;kernel&quot; on a browser. It was more of an academic exercise than anything else, but my intention was to have a the following:<p>Being able to unload and reload javascript. The initial idea was to write the website inside the website, but at the core level it requires having something akin to process isolation for javascript. It also requires the dom to be isolated.<p>Implementing 9p2000, and share resources across browsers. I’ve been reading about the ideas of plan 9 and i would like to implement something that allows me to connect point to point to other browsers and mount their FS into mine so we can share resources.<p>One of the cool results that I got was that since the dom is not directly changed (each process&#x2F;worker has its own partial dom and every time that it changes it a delta is sent back to the main thread for sync) it allows javascript to be running somewhere else (another browser, back end server) and sync’ed back (much like vadaain, but more agnostic).<p>Most of the code was inspired by the linux kernel (which gave me a reason to go learn its internals) and is kinda nasty at some points but is written in typescript as some of you have already mentioned. Someone might find it interesting even if just for the educational purpose of it<p><a href="https:&#x2F;&#x2F;github.com&#x2F;intigos&#x2F;possimpible" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;intigos&#x2F;possimpible</a>
评论 #29826277 未加载
nicolasleglandover 3 years ago
Mandatory Gary Bernhardt. <a href="https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death-of-javascript" rel="nofollow">https:&#x2F;&#x2F;www.destroyallsoftware.com&#x2F;talks&#x2F;the-birth-and-death...</a>
评论 #29829213 未加载
0xbadcafebeeover 3 years ago
The browser <i>is</i> an operating system now. Chromebooks proved that a long time ago. Every single feature of a native app is implemented in the browser now. There&#x27;s already multiple different versions of &quot;apps in browsers&quot; (PWAs, SPAs, etc). It&#x27;s just taking the industry a very long time to come to grips with the fact that they are writing dynamically-downloaded-and-interpreted apps for an operating system in an operating system in a scripting language that uses assembly to implement another virtual machine. They can&#x27;t come right out and say it because it&#x27;s ridiculous. But that&#x27;s what it is.<p>We failed at making network protocols, so every protocol improvement now goes over HTTPS. We failed at making universal virtual machine-based applications, so every new app is in the browser. We failed to bridge the gaps of client-based, server-based and p2p computing, so we build all 3 into one interface. None of academic computer science seems to reflect this, and we still write most of our code by hand like it&#x27;s the 1970&#x27;s. We use fixed-width text-based 80-character terminals embedded in 8K OLED displays. Our telephones have as much processing power, memory and storage as our desktop computers and use batteries that last for 2 days (and are 1&#x2F;10th the size), but we haven&#x27;t yet standardized on one way to create new lines in a text file.<p>We&#x27;re farmers from the 17th century working at a biotech startup.
asicspover 3 years ago
Past discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13151566" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13151566</a> <i>(2016, 124 comments)</i>
评论 #29823795 未加载
评论 #29825850 未加载
btbuildemover 3 years ago
Why not &quot;stream&quot; an image of an actual OS (say, linux) to the browser? Has anyone pulled that off yet? (Kind of like rendering services for example, the client is just for user interaction, everything else is streamed from server where all the computation happens)
评论 #29824051 未加载
评论 #29826162 未加载
评论 #29824085 未加载
评论 #29825688 未加载
评论 #29824072 未加载
评论 #29824023 未加载
评论 #29826950 未加载
评论 #29835926 未加载
the_arunover 3 years ago
What is the use case this is solving?
评论 #29827011 未加载
评论 #29826273 未加载
edemover 3 years ago
I have a big problem with this: where is the link to try it? I just don&#x27;t understand when I read something about an &quot;x that works in the browser&quot; and there is no demo link.
评论 #29825468 未加载
benatkinover 3 years ago
I&#x27;d like to see Node.js running on it. I know StackBlitz has &quot;WebContainers&quot; but I&#x27;m looking for something open source.
评论 #29827189 未加载
评论 #29827084 未加载
CGamesPlayover 3 years ago
So emscripten is still the compiler, but this is an OS which can be targeted by emscripten? Am I understanding it right?
评论 #29823565 未加载
评论 #29827070 未加载
mattowen_ukover 3 years ago
Based on how we see so many &#x27;OS in the Browser&#x27; links here on HN, am I right to be underwhelmed by this one?
评论 #29824392 未加载
评论 #29823471 未加载
评论 #29829527 未加载
jedisct1over 3 years ago
As an alternative to maintaining an Emscripten fork, Browsix could be added as a new target to Zig.
评论 #29827643 未加载
throwawayHN378over 3 years ago
Hmmm cool but cd is not implemented? Still awesome especially for an undergrad proj
评论 #29829498 未加载
rank0over 3 years ago
This is amazing.<p>I’m imagining all the ways I could use this for offensive security tools.<p>If I had a way to import a js library that enabled running web servers, invoking OS commands, or running a reverse http proxy I’d be able to do so much damage to any target client.
评论 #29829217 未加载
artificialLimbsover 3 years ago
Does it handle copy paste?
JMS2021over 3 years ago
Test
usr1106over 3 years ago
2 questions:<p>* why?<p>* security?
评论 #29824385 未加载
评论 #29823955 未加载