Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love WebAssembly/WASI, but I'm concerned about us repeating the mistakes of the past.

How does the dependency model work? Can I safely install parallel streams of software? Does it support unprivileged installation? Is the installation stateless (no scriptlets/lifecycle scripts)?



> Is the installation stateless (no scriptlets/lifecycle scripts)?

I feel like the reason `npm`/the node.js ecosystem has these is because... as soon as you want to do anything serious, you need them.

How else do you build native modules across different platforms, run initial post-installation configuration scripts, etc.?


> How else do you build native modules

It is my understanding that wasmer is trying to create a new ecosystem that doesn't rely on native modules.

> run initial post-installation configuration scripts

It's been my experience, as a long-time Linux user, that this is actually a bad thing. Stateless systems are far easier to work with -- a package manager can be far faster and simpler if it just extracts an archive. I can't think of a single case where post-installation configuration scripts couldn't be replaced by something simpler, using the filesystem.


Downloading a dependent native library from an official source, based on the current OS version.


Could this not be done though the dependency system itself, if it were sufficiently generic?


You make it declarative instead of scripted.

Scripts aren’t truly platform independent. You’ll branching logic for different platforms. Why not capture that with different declarative structures for each platform?

Running scripts as part of software install is something we, as an industry, need to solve.


> How does the dependency model work?

Currently dependencies are keyed by namespace, name and version. There is a global namespace that has restricted access. WAPM does not do any dynamic linking of WebAssembly and currently only resolves dependencies one node deep. This will likely change in the future as the story on WebAssembly libraries and dynamic linking becomes more concrete.

> Can I safely install parallel streams of software?

WAPM operates synchronously at the moment, but there is no reason why WAPM should not be able to install dependencies concurrently.

> Does it support unprivileged installation? WAPM installs packages into a "wapm_packages" directory in the current directory. WAPM will probably support global installs in the future. WASI enables a "capability-oriented system", but this is a concern of wasm runtimes, and not WAPM. WAPM only manages wasm binaries.

> Is the installation stateless (no scriptlets/lifecycle scripts)?

WAPM installs with a single command and there are no lifecycle scripts. Ideally, one would install their wasm packages with wapm-cli and not require any intervention from other tools. It was designed to be unobtrusive.


> WAPM operates synchronously at the moment, but there is no reason why WAPM should not be able to install dependencies concurrently.

I'm sorry, I didn't word that well. In Fedora, there is a feature called Modularity that enables you to switch between different release streams (for instance, Node.js LTS or current). You can do so with `dnf module install nodejs:11` or `dnf module install nodejs:10`. Since `dnf` is installing into a single global space, though, it isn't possible to install both nodejs:11 and nodejs:10, and the Fedora project recommends containers as a solution here. Could WAPM support this use case, without requiring one to buy into the entire container tooling ecosystem?

> no lifecycle scripts

Yes! This could enable a declarative OCI image build tool, which could be used to bridge the gap between Wasmer and the Docker/Kubernetes stack.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: