Earlier quoted context omitted.
Java (like mentioned in the article) does the same though IIRC Inferno OS is like Java in this regard. How will WASM change what Java has already done? Why would I compile Rust to WASM when I can compile Rust natively to any number of platforms? And use FFI? I think WASM, while nice, doesn't bring much new to the table. It's been hyped for years, and I still only see it used here and there very sparingly.
This is how. The installed size of OpenJDK 17 JRE on my machine is 186MB, according to the package manager. I suspect that the WASM VM embedded in the program demonstrated in the blog post is 1.5 to 2 orders of magnitude smaller.
Reaching the Unix philosophy's logical extreme with WebAssembly
101–110 of 142 posts
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#102Earlier quoted context omitted.
Wasi co-chair and Wasmtime maintainer here: we agree! Wasi Preview 1, which this article is about, was a first attempt at porting some of these Unix ideas to Wasm. We found pretty quickly that unix isn't the right abstraction for Wasm. Not only is it not really portable to platforms like Windows without reinventing a compatibility layer like cygwin, it also doesn't really make sense in a Web embedding, where users en…
Nothing like reinventing COM :)
Look at the latest Microsoft thing about embedding Python in Excel. They're going the wrong direction. What everybody wants is to be able to drive Excel from Python aka an API that people could hook into.
Even WASM is kind of ... weak ... because it has to deal with the lowest common denominator--a web page with a single thread of execution and no access to anything.
And, COM wasn't terrible--it's just that the languages attempting to support it were very underpowered at the time. COM with VB6 created a huge ecosystem that probably still isn't really matched today.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#103Earlier quoted context omitted.
Java (like mentioned in the article) does the same though IIRC Inferno OS is like Java in this regard. How will WASM change what Java has already done? Why would I compile Rust to WASM when I can compile Rust natively to any number of platforms? And use FFI? I think WASM, while nice, doesn't bring much new to the table. It's been hyped for years, and I still only see it used here and there very sparingly.
This is how. The installed size of OpenJDK 17 JRE on my machine is 186MB, according to the package manager. I suspect that the WASM VM embedded in the program demonstrated in the blog post is 1.5 to 2 orders of magnitude smaller.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#104Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#105Everything is not a file. There are files and file-contents. The content of a file is not a file. The magic trick happens with #SheBang because that tells you who should interpret and execute the file-contents. That is "magic" because in a sense you must read (part of the content) to know how the contents which is just 0s and 1s should be interpreted.
There are two dimensions to "everything is a file". The first is the concept of a hierarchical filesystem namespace. The second is the notion that read and write can be used as a universal interface to any resource from the perspective of the runtime environment (e.g. kernel). People focus myopically on the first aspect, but it's really the second that is the most important and most enduring. The word "file" is ambig…
But something you can read and write to is not called a file, it is called a stream. It is no accident that Linux differentiates between “files” that you can write to at arbitrary places, or ones that are append-only.
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#106I wonder if we can reliably expect React-in-Rust framework that compiles to wasm instead of js? Or maybe just a React library written in Rust, but you can still write the source code in javascript? Or maybe at least Typescript-to-WASM compiler to skip JS output?
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#107Earlier quoted context omitted.
Looks like memfd_create is from Linux 3.17 (2014), which was after I wrote the function. I sort of miss the days when simple stuff was hard.
>I sort of miss the days when simple stuff was hard. what? what's the point? for me it's the most annoying thing when the simple stuff is hard because why would it be?
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#108WASIX may be of relevance to the article https://wasix.org/
Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#109Re: Reaching the Unix philosophy's logical extreme with WebAssembly
#110Reminds me of that time I wrote a StringToExecutableFile() function for running [e.g. a Rust binary] from C++, but that depended on several layers of build system horror to embed the executable file as a string, and it wasn't cross-platform. Imagine a utility function that dumps an embedded string to an unlinked temporary file, sets the +x permission, and returns a /proc/self/fd/N filename so you can exec() a subproc…