Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
sunfish
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
sunfish
3y ago
I work on WASI, and completely agree. A lot of things are not clearly documented right now, and we're working on fixing it.
2.
▲
by
sunfish
4y ago
That cleaner foundation is shared-nothing linking, capability-based security, virtualizable APIs, and more, and a WASI organized around things like streams as first-class types. The goal is to build a new platform. Initially, that looks lik
3.
▲
by
sunfish
4y ago
It depends on what you mean by "at the bottom". If you mean at the bottom of the wasm, the the answer is, those won't be legacy APIs. The direction we're heading is to provide POSIX compatibility as an emulation layer on
4.
▲
by
sunfish
4y ago
Not yet, at least. But we're working on that :-).
5.
▲
by
sunfish
4y ago
In systems designed for it, communication channels can transmit handles without using a shared namespace or master list. An example of this in the real world is Unix-domain sockets having the ability to send file descriptors across the sock
6.
▲
by
sunfish
4y ago
It does, but that opens up much more powerful tools to work with. As an example of one such tool in practice, compare the task of "list all open file descriptors in an arbitrary Unix process" with "list all strings an arbitra
7.
▲
by
sunfish
4y ago
Typing is nice, and when one is working within an existing system where environment variables are the main way for communicating data between parts of a system (which is many popular systems today), this kind of typing looks like it can ad
8.
▲
by
sunfish
4y ago
There are IPC mechanisms today which aren't just bytes. For example, the ability to send file descriptors over unix-domain sockets. Strings of bytes fundamentally can't do that. And in programs that pass file descriptors, it doesn
9.
▲
by
sunfish
4y ago
I have a previous-generation Lemur Pro and suspend/resume on lid close/open works great.
10.
▲
by
sunfish
4y ago
Wasm is Turing-complete. What people typically mean by this is that in a browser context, compiling JS to Wasm does not currently make it run faster than just running the JS as JS. Javascript can be compiled to WebAssembly, and there are
11.
▲
by
sunfish
5y ago
This is true, however if we modify the program to print a 4096-byte long string instead of just the "hello world" string, then it's not sufficient again. And of course, the number 4096 is system-dependent. So to really do h
12.
▲
by
sunfish
5y ago
It's indeed possible! I and others are building a Rust version of this: https://github.com/sunfishcode/mustang It supports threads, filesystem, networking, and more! The library for making Linux system calls is:
13.
▲
by
sunfish
5y ago
If there's community interest, there is a possible path where Mustang matures to the point where it makes sense to talk about how to incrementally migrate the parts that make sense into Rust proper.
14.
▲
by
sunfish
5y ago
First-class values are values which you can pass as arguments, return as return values, and hold in local variables. Values of type `File` or `TcpStream` are first-class in this sense. They show up in function signatures in the same way as
15.
▲
by
sunfish
6y ago
It does; the stack pointer starts out aligned, but then the function does a call, and the call instruction adjusts the stack pointer by 8 bytes to push the return address, which would cause it to be misaligned. The push pushes an extra 8 by
16.
▲
by
sunfish
6y ago
The compiler is using push and pop here just for their side effect of adjusting the stack pointer, to keep the stack pointer 16-byte aligned.
17.
▲
by
sunfish
7y ago
Good catch on that bug! I'll fix that. Beyond that, that file is just a simple example for showing how to work with the toolchain and the sandbox.
18.
▲
by
sunfish
7y ago
As context, at the time of those issues, the control-flow restrictions were a compromise to help get the "MVP" off the ground, with the understanding that "more expressive control flow" was expected to be added later: h
19.
▲
by
sunfish
7y ago
Unfortunately, we don't actually have data which supports this. The only data that was collected at the time showed that if/else compress better than what wasm has without if/else. There are other ways we could have compresse
20.
▲
by
sunfish
7y ago
WASI has some unique goals around extending the WebAssembly sandboxing concepts into the API space using capability-based security, forming one of the key building blocks for nanoprocesses. Beyond that, WASI will indeed likely reuse existin
21.
▲
by
sunfish
7y ago
This is discussed in the blog post; see the discussion of "time protection".
22.
▲
by
sunfish
7y ago
Yes. We know that WebAssembly in its present form doesn't yet have all the functionality we'll want to make all this efficient, so we're active in many areas in the WebAssembly standards process helping move it forward.
23.
▲
by
sunfish
7y ago
Wasmtime is being developed to be usable as just such an embedded runtime. We have some demos of this here: https://github.com/bytecodealliance/wasmtime-demos
24.
▲
by
sunfish
7y ago
It's not specifically referring to certification or process, it's more about software architecture. It's referring to how the core WebAssembly instruction set has no I/O instructions, so it can't do anything other t
25.
▲
by
sunfish
7y ago
WebAssembly is expected to be around a long time, so it's not enough to just measure its speed today, because engines aren't very mature yet. As engines mature, it will likely get faster. Also, performance is just one factor. Othe
26.
▲
by
sunfish
7y ago
The twist is, you can produce wasm from LLVM, including running the full mid-level optimizer first, which is the part of LLVM where those annotations and aliasing information are most valuable.
27.
▲
by
sunfish
7y ago
Much of what makes Electron Electron are the APIs it provides. The blog post here is a way to describe and work with APIs, not actual new APIs. We're working on APIs too, in WASI, but there's a lot of work to do to build everythin
28.
▲
by
sunfish
7y ago
It's a balance. You probably won't see things like Rust's `Vec` exposed as a wasm API by itself, because at that granularity, language-speciric API details are really important, and the actual code you could reuse is relative
29.
▲
by
sunfish
7y ago
Besides the technology questions, there are also non-technical considerations too. Who do you want governing the package repo you host all your code in?
30.
▲
by
sunfish
7y ago
Note that Wasmtime is the engine starring in the blog post and demos :-). Of course, cross-language interfaces will always have tradeoffs. But we see Interface Types extending the space where the tradeoffs are worthwhile, especially in comb
More ›