HNHacker News
TopNewBestAskShowJobs

tschneidereit

131 karma · joined October 23, 2014

WebAssembly & Components & WASI @ Akamai. Started and help lead the Bytecode Alliance.
submissionscomments
tschneidereit··on The Road to the WASM Component Model 1.0
Oh, no worries at all—it happens!
tschneidereit··on The Road to the WASM Component Model 1.0
[Creator of the StarlingMonkey JS runtime here]

> It works in the browser already, by bundling another browser runtime engine into wasm.

Note that that's not how JCO works: JCO unbundles a Component, emitting core wasm modules plus JS glue code. JCO also is a toolchain that can orchestrate turning JS into a Component, and that does bundle a JS runtime (StarlingMonkey), but that's not for running Components in JS/browsers, but for running JS in Component runtimes, such as Wasmtime.

tschneidereit··on Debunking Cloudflare’s recent performance tests
Oh, no worries at all!

While there was no acquisition involved, a whole group of folks working on WebAssembly at Mozilla (myself included) moved to Fastly last Fall. What I tried to emphasize is that instead of the projects at hand here being open source because they somehow had to be, we all joined Fastly because it's a place where this kind of project can be made open source (and be created in the first place!) :)

tschneidereit··on Debunking Cloudflare’s recent performance tests
It's really the other way around: we joined Fastly because we knew it's a place where we could do this kind of work in the open.

None of the code involved here existed a year ago, and none of it was somehow forced to be open source. (Also, the code in these two repositories is in many ways the most boring part of this solution. See this blog post for an excellent overview of the more interesting parts: https://bytecodealliance.org/articles/making-javascript-run-...)

tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
That is how we support references in the Rust toolchain right now, via wasm-bindgen, and it's an important part of making unforgable references work for languages that rely on linear memory.

It doesn't help with making capabilities more fine-grained, though: we have to treat all code that has access to that table as having the same level of trust.

tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
Agreed, and there are a lot of UX questions to sort out. Many security concepts took many attempts to figure out in full (or to the extent that they have been figured out :))

One important aspect here is that this doesn't just target whole apps. It also targets developers using dependencies: while it's desirable to restrict an application's capabilities, there's a lot of value in developers only giving packages they depend on very limited sets of capabilities. And that seems much more tractable, given that kitchen-sink packages aren't what most people want to use anyway.

tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
Indeed: that and many other things are prior art in this space. And there is a lot of prior art for what we're working on—this is not meant as an academic research project! :)
tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
What you're describing will indeed be introduced with the WebAssembly GC proposal: https://github.com/WebAssembly/gc

For languages that can express unforgeable pointers as first-class concept, that is indeed a very attractive, fine-grained approach. Unfortunately bringing that to languages like C/C++/Rust is a different matter altogether.

Since we want to support those languages as first-class citizens, we can't require GC support as a base concept, so we have to treat a nanoprocess as the unit of isolation from the outside.

Once we have GC support, nothing will prevent languages that can use it from expressing finer-grained capabilities even within a nanoprocess, and that seems highly desirable indeed.

(full disclosure: I'm a Mozilla employee and one of the people who set up the Bytecode Alliance.)

tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
To expand on this, capabilities allow us to go further than pledge(2): it enables selective forwarding of capabilities to other nanoprocesses, such as only forwarding a handle to a single file out of a directory, or a read-only handle from a read-write one, etc...
tschneidereit··on The Bytecode Alliance: Building a secure, composable future for WebAssembly
And Wasmtime will also support both of those. Support for environments in which JITting is not an option is of course really important to this!
tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
We're working on that, too :) See this post from last Fall where we laid out a way to think about where WebAssembly is going, which use cases to enable, and how: https://hacks.mozilla.org/2018/10/webassemblys-post-mvp-futu...
tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
Good news: we fully agree with these goals!

On 1, the libc we're working on[1] is based on musl. It won't ever be 100% compatible with all code, because that runs into constraints imposed by our security goals, but the vast majority of code should eventually just compile when targeting this. (Eventually, because this is all early days.)

On 2, yes, that is explicitly the goals. I'd add that it's not just about OSes, but also about platforms and hardware form factors.

[1] https://github.com/CraneStation/wasi-sysroot

tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
Oh, this is amazing!
tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
Yes!
tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
We've mainly based the current design on CloudABI/Capsicum, but it's all early days, and Fuchsia is on our list of systems to at the very least take heavy inspiration from :)
tschneidereit··on Standardizing WASI: A system interface to run WebAssembly outside the web
(Member of the team at Mozilla here )

Yes, that's the list.

And the layout of structs, strings, etc is up to the compiler, within the bounds of the restrictions WebAssembly imposes.

We'll definitely have a test suite, but this is all early days, so a lot of all that isn't yet in place.

And yes, this can be targeted by LLVM-based and other compilers. In fact, Emscripten could use this as the foundation for their POSIX-like libc and library packages. The syscalls are indeed exposed as Wasm function imports.

tschneidereit··on Hello wasm-pack
This is indeed a problem for Wasm/JS integration. The JS WeakRef proposal[1] will address it for many use cases, and the WebAssembly GC proposal[2], combined with JS Typed Objects[3] will address many others. Even before those features will be available, I'd expect the community to iterate on patterns to make APIs nicer.

[1] https://github.com/tc39/proposal-weakrefs [2] https://github.com/WebAssembly/meetings/blob/master/2018/pre... [3] https://github.com/tschneidereit/typed-objects-explainer

tschneidereit··on Rust required to build Gecko
Intermittently failing tests are a problem that all large code bases have, regardless of the used language. See for example this post about Google's code base[1], which is largely Java, Python, and to some extent Go and Dart, IIUC: https://testing.googleblog.com/2016/05/flaky-tests-at-google...

[1] They don't say which code base the post is about, so I'm just assuming that it's not Chromium. If it is, it'd largely be C++.

tschneidereit··on Lossless Web Navigation with Trails
That last part doesn't work, unfortunately. We looked into doing exactly that, but the way history navigation works is specified quite strictly - and relied upon by existing web content - making this infeasible.
tschneidereit··on Lossless Web Navigation with Trails
See my reply in another conversation thread: https://news.ycombinator.com/item?id=13520978
tschneidereit··on Lossless Web Navigation with Trails
(Member of the browser.html team here)

There's a section at the end about how we got to this approach. You're right that there isn't too much detail there, though.

In short, research on how people interact with information sources shows that we rely on the kinds of connections we're trying to preserve as important queues for remembering and mentally sorting information.

As other posters here have pointed out, purely looking at the informational content it'd be enough to copy over the current tab's history stack when opening a link in a new tab. That doesn't mean that this information is easily consumed, though: while the degree to which this is true varies from person to person, by and large our mind works in a way that we have a hard time grasping connections between nodes in a graph without seeing enough of it at the same time and being able to map it out. If the only way to get any insights into the graph is to look at each tab's history stack individually, that's fine for compuers, but just not too useful for people.

See Patryk's earlier post on this topic (and the post's bibliography) for much more background information: https://medium.freecodecamp.com/browserhistory-2abad38022b1

tschneidereit··on Servo Nightly Builds Available
Things like history management. While tabs in browser.html are just iframes, browser.html needs more access to the contained documents to be able to fully do its job. For security reasons, you can't get at an iframe's current location/title/favicon if the loaded document is from another domain. We need this information to show a proper title in the title bar and the tabs list, and to show a back button and things like that.

In addition, the browser needs to act as a sort of broker between sites and the OS. Storing cookies and session data, showing notifications or dialogs, and entering fullscreen mode are just a few examples of this. (Note that most of these things aren't even implemented yet. Browsers are complex applications in their own right, even after accounting for the browser engine.)

tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
EME is a way to add DRM support to html5 video, but it's not compatible with Flash's DRM system, so can't directly be used to implement that.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
Thanks, bug filed: https://bugzilla.mozilla.org/show_bug.cgi?id=1133323
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
Can you give steps to reproduce this crash? It should definitely not happen. In fact, until https://bugzilla.mozilla.org/show_bug.cgi?id=558184 is implemented we rely on an installed Flash plugin to make the Flash detection used by most sites work.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
The problem with PIV, as with a few other video services, is that it uses DRM. AS you're probably aware, there are some quite unfortunate laws around that which prevent anyone from just offering an alternative implementation of a DRM system. Hence, we can't even try. That's not to say that we won't ever be able to offer at least some support for services like this, there might well be ways to work out something clever.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
Exactly. We did a survey of Flash exploits from the last few years and almost all of them would simply have been impossible in Shumway. That doesn't mean that Shumway will automatically free of all security bugs, but the whole class of bugs that in some way is caused by memory corruption is only possible through bugs in Firefox's JS engine SpiderMonkey. Of course it's much easier to just exploit them in JS directly then, so Shumway doesn't increase the surface attackable through bugs like that.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
We're looking at tests and sometimes implementation details from the other open source projects, yes. E.g., we've used the SWFDec tests extensively in our work on the older AVM1 language runtime.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
Eventually we hope to get to the point where we can play all SWF files and hence have Shumway be a complete drop-in replacement for the Flash plugin. Since implementing full support for all capabilities (and matching all quirks) of a two decades-old platform is a huge undertaking, we're not trying to get there in one big leap. Instead, we're gradually widening the set of supported content so we can get to something useful to end users sooner.
tschneidereit··on Firefox Nightly now plays Amazon.com Flash videos using Shumway
Our pleasure! :)

There are two easy ways to test Shumway on all SWF files: if you don't want to use Firefox Nightly, you can just install the extension from http://areweflashyet.com/ and should be all set. If you're using Firefox Nightly, you can simply visit about:config and change the shumway.swf.whitelist setting to "*". Note that you still need to have the Flash plugin installed for most sites to work, as I explained in another comment a few minutes ago.

Regarding the table of supported APIs: the problem with that is that we actually have most APIs implemented, but have compatibility bugs in some of them which break content. If we could easily list the broken APIs, then in most cases we could just as easily fix them. That said, there are some major API areas we don't yet support. Those are mostly related to newer and thus less-used capabilities, such as Flash's version of WebGL, called Stage3D, and a new text layout system called Text Layout Engine.

Page 1 of 2Next →