TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

V86: x86 virtualization in the browser, recompiling x86 to WASM on the fly

265 点作者 tomduncalf大约 3 年前

14 条评论

jansommer大约 3 年前
This is a really cool project. I&#x27;m currently working on a tutorial on how to use it with Buildroot Linux and Tiny C Compiler, where I now have tcc in the browser. v86 is unable to debug with gdb (v8, 10.2, 11.2) (though it works if you use gdb to intercept gdbserver from another device), so I&#x27;m experimenting with strace, and have written a basic streaming parser for read&#x2F;writev syscalls. What strace does is intercept printf&#x2F;puts&#x2F;gets&#x2F;readline etc and by parsing its output, one can create a simple but highly stylable &quot;console&quot; in html that prints and reads text input. No support for TUI&#x27;s, this is where xterm.js shines.<p>Compilation in tcc with a file of ~300 lines of code, linking to a library, takes roughly 50 ms. Compiling the entire libharu library takes 23 s. It&#x27;s ~120.000 SLOC but where most is long arrays of encoding data.<p>I have used musl as toolchain, but will look into uclibc because of a weird problem: printf without \n in the end doesn&#x27;t display the text before something creates a newline. And that could be readline, in which case you&#x27;d get:<p><pre><code> Pizza What&#x27;s your favourite food? </code></pre> At least I think this is because of musl where there&#x27;s a problem with the syscall writev: <a href="https:&#x2F;&#x2F;www.openwall.com&#x2F;lists&#x2F;musl&#x2F;2013&#x2F;05&#x2F;05&#x2F;9" rel="nofollow">https:&#x2F;&#x2F;www.openwall.com&#x2F;lists&#x2F;musl&#x2F;2013&#x2F;05&#x2F;05&#x2F;9</a>.<p>Really looking forward to get the tutorial out and I hope it&#x27;ll be with the strace based console!
评论 #31271872 未加载
s-macke大约 3 年前
If the title is true, that would be a huge achievement. Unfortunately, the page says nothing about how it works and nothing about the speed advantage you get.<p>For my emulator jor1k [1] I tried something similar years ago [2]. However I haven&#x27;t continued on this topic because of priority shifts. But the potential speed advantages are astonishing. My proof of context reached more than 1 billion emulated machine instructions per second.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;s-macke&#x2F;jor1k" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;s-macke&#x2F;jor1k</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;s-macke&#x2F;jor1k&#x2F;wiki&#x2F;Breaking-the-1-billion-instructions-per-second-barrier-via-Dynamic-Recompilation-and-WebAssembly" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;s-macke&#x2F;jor1k&#x2F;wiki&#x2F;Breaking-the-1-billion...</a>
评论 #31270910 未加载
评论 #31271537 未加载
评论 #31271302 未加载
评论 #31273223 未加载
评论 #31275432 未加载
DustinBrett大约 3 年前
This is an awesome project! I&#x27;ve integrated it into my Desktop Environment in the browser so that you can drag on ISO&#x2F;IMG files and run them directly in the emulator. It also automatically saves states on close into &#x2F;Users&#x2F;Public&#x2F;Snapshots. For networking I am using the same WebSocket proxy that v86 uses.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;DustinBrett&#x2F;daedalOS" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;DustinBrett&#x2F;daedalOS</a>
jbverschoor大约 3 年前
I never actually played with Windows 1.0, but wanted to see what the concept was about.<p>It&#x27;s interesting to see that the window sizes are automatic. There are no real windows. Also, it&#x27;s kind of fun to see that there&#x27;s no &quot;Maximize&quot;, but &quot;Zoom&quot;, just like macOS.. And double-clicking the titlebar actually minimizes the application to an icon, just like macOS.<p>The write.exe program is pretty cool
评论 #31271171 未加载
kaba0大约 3 年前
There is a working, client-side only linux running with another similar technology: <a href="https:&#x2F;&#x2F;leaningtech.com&#x2F;cheerpx&#x2F;" rel="nofollow">https:&#x2F;&#x2F;leaningtech.com&#x2F;cheerpx&#x2F;</a>
评论 #31273252 未加载
hobo_mark大约 3 年前
Looks like an older precursor to WebVM (which is closed source). <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30167403" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30167403</a>
评论 #31271486 未加载
allanrbo大约 3 年前
The Windows 2000 demo reminded me of just how clean, fast and consistent Windows was in that era. Compared to today.
farmin大约 3 年前
Ok so umm does that mean we can push a full operating system in any mobile app with a webview?
WithinReason大约 3 年前
I crashed IE5 in Win98 by just using Google. Brings me back...
评论 #31274100 未加载
ototot大约 3 年前
<a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12581427" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12581427</a>
pjmlp大约 3 年前
Nice to see Oberon System 3 there, it doesn&#x27;t seem complete though.
RantyDave大约 3 年前
Very, very cool. And slow. But cool.
radarsat1大约 3 年前
Incredibly cool. And the demos are impressive.
elite_mgmt大约 3 年前
Github teaches humility.