186 points · by syrusakbary · 4y ago · 47 comments
I’m Syrus, from the Wasmer team. We just released the new version of WAPM that is an order of magnitude better than the previous one (that we also announced here in HN two years ago! [0]), enabling an incredible experience for using and publishing WebAssembly packages.
The tech stack that we are using includes:
* Python and Django (for the backend) with Graphene (for the open GraphQL API [1]) and Django Channels with websockets over GraphQL [2] for subscriptions
* Next.js [3] with React-Relay [4] and Tailwind.css [5] for the frontend
* WebAssembly and Wasmer [6] (for the online shell)
Vercel for serving the frontend and GCP for serving the backend.
Please let me know if you have any questions, I’d be very happy to answer them!
And from what I've read the CLI downloads the WASM and runs it. The "runs it" part is interesting, as it's cross platform - so does it run a JS engine, e.g like V8 or NodeJS?
I don't personally like the idea, esp since Rust can compile to all those supported platforms anyway, and the native code would be so much faster.
It says on the website that it is opensource, since 2019, but the Github account has zero repos.
The website looks flash, but has many spelling errors and typos, and so if little things like this get through after 3 years of development, then the chances of malicious code getting through is very high.
The site doesn't inspire a lot of confidence, even the about page results in a 500 error. https://wapm.io/about
As does support, https://wapm.io/support
The future needs a better solution to this problem than a single company owning the package repo.
They tried to trademark the terms WASM and WebAssembly.
I was looking into WASM libraries recently, specifically WebAssembly Interface Types (WIT), and my conclusion is that WASM libraries are experimental and poorly supported right now (unless you only have i32/i64/f32/f64 as parameters and returns).
I couldn't find any elaboration in the documentation on libraries, what level of supported does this have? Is interface type implemented?
"Apps, libraries, and native executables that run on Linux, macOS, and even Windows."
The 'even Windows' makes me wonder whether Windows support is fragile or not fully baked? I don't know a lot about WASM--does it generally not work well on Windows? If it's working smoothly, I'd consider taking that 'even' out.
I do love the initiative though.
> Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://registry-cdn.wapm.io/packages/_/sqlite/sqlite-0.2.2.....
Looks like you'll need to add a `Access-Control-Allow-Origin` header to your repository to get it to work right.
It seems Firefox is not treating the COOP/COEP headers as it should, and it's interpreting `Cross-Origin-Opener-Policy: same-origin` as to only allow the same domain (wapm.io) but not any parent subdomain (registry-cdn.wapm.io), while Chrome supports fully this use case treating both domains as `same-origin`.
In summary, I believe it's a bug in Firefox that I'm not sure how can be bypassed.
EDIT: I got things wrong. The issue is now fixed in Firefox
Thisnis the first time I'm reading about this header, but if you know more you should file a bug with Firefox to get it confirmed and/or fixed.
Security headers like these are hard to keep up with, there's bound to be a bug in the implementation somewhere. At least it fails safely this time!
[1]: https://html.spec.whatwg.org/multipage/origin.html#the-coop-...
Good news is... right now things work as they should in Firefox!
Assuming the goal is able to use software written in any language as easy as it is if you were a java or dotnet developer, how do you plan on getting this as big as npm or PyPI? A lot of the examples I've clicked on seem to be forks of the projects instead of pulling in the original source as a git submodule.
My Bazel-based bias would be to assume WASM is mostly an execution platform target, just like linux/x86_64 or macOS/m1, and I should be able to pull in and compile the source myself at any version I choose. It is hard enough as it is to pull in official third-party library sources into Bazel due to the varied ways libraries are built, so I don't see how the current official maintainers of projects will also volunteer to also maintain their build process and profile for WAPM too.
Some feedback about potential issues:
When I search packages for "Library" for "All Time" nothing shows up in the list. But things like sqlite and ken-matsui/jyt are labeled as "Library" on the detail page, while their docs make them look like "Standalone".
Package details probably should be sanitized. For example in rajsite/exorbitant the GITHUB attribute uses a git+https URL which isn't helpful for a web browsing session. And the HOMEPAGE says https://github.com/rajsite/exorbitant, but the actual link goes to "cowsay.overnice.com". I haven't created an account to see how a package is created, but a GitHub project link should only accept user/repo to generate the URL automatically.
The collaborators list of ken-matsui/jyt is empty, yet the package says it was last updated 2 days ago. The tooltip on the avatar icon says "ken-matsui", but it isn't an alternative way to click to the profile/namespace page. Also last updated-by should display the user/namespace name of who updated it, even though it is implied.
Recommend cleaning out or suppressing in search package that haven't been updated or attested to be up-to-date within a few months. For example "sqlite/sqlite" is showing up for me in "Popular Standalone Apps" on the homepage, but it hasn't been updated in 2 years. I see that you own the package, but also understand that you need to get the repository seeded with useful packages, and that a startup can take many years before hitting the next point in the change of the growth curve.
I don't quite understand how this fits in the picture of other package managers. If it's capable of being a multi-platform package manager, that would be great, but I suppose it's a complex task to have software and libraries running on all operating systems without any difference in usage.
Is it a stated goal of this tool? Am I looking at this the wrong way?
A quick bug report: the "Open in Shell" feature seems to fail in Firefox due to a CORS problem? It did work in Chrome when I tried it though.
Another question - it seems like a lot of the packages are pretty out of date, for instance the end-of-life Python 3.6 - clicking through to the GitHub page it looks like it's managed by a wapm-packages organization, and managed by Wasmer itself. Will they get more updates now that the new version of WAPM is out? Is it more of a community driven thing? (And an additional bug report, the Wasix link in the wapm-packages/python README is broken)
Some packages (like Python 3.6) are a bit out of date. We are planning to update most of them as languages add native support for Wasm and WASI. But yes, in general the packages are mainly community driven.
For example, you should be able to try irb / Ruby latest version here (thanks to their WASI support upstream a few weeks ago!)
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://registry-cdn.wapm.io/packages/katei/irb/irb-0.1.3.ta.... (Reason: CORS request did not succeed). Status code: (null).
It is every package. Looks neat anyway! thanks.
But it looks like a WebAssembly version of Homebrew.
On the client-side of things, browsers don't currently support arbitrary socket connections it so that might be a bit tricky! But still feasible, for example you can proxy the socket packets through websockets and a main server that handles the outside connections
Also is there a way to use the WAPM packages I install from emscripten? How would I import these packages from C?
[0] Previous announcement in HN (2019): https://news.ycombinator.com/item?id=19732794
[1] https://registry.wapm.io/graphql
Why doesn't the backend use WASM and/or Wasmer?
I also was way faster to develop it in Python with a framework I was familiar with rather than in other language that compiles to Wasm!
But everything is made so in the future it could be executed with Wasmer :)
* user experience
* speed of feature development
* operational cost including cloud billing and staffing/training costs
A particularly damning incident was the time they tried and failed to trademark "WEBASSEMBLY", an open W3C standard [2] [3]. There are many choice words for companies trying these kinds of stunts.
Webassembly is growing despite Wasmer's existence. Not because of them. Be cautious.
[1]: https://bytecodealliance.org/
[2]: https://tsdr.uspto.gov/documentviewer?caseId=sn88703780&docI...
[3]: https://github.com/WebAssembly/WASI/issues/3#issuecomment-71...
The very first things you should be talking about on your service is provenance mechanisms and security.
I don't believe I saw anything related to thos topics on your site. Did I miss it?
You can read more about it here: https://medium.com/wasmer/securing-wapm-packages-with-packag...
There's an informal group of software repo folks meeting with some assistance from the OpenSSF. WAPM folks, please feel free to hit me up at my work email (in profile).
Or perhaps I'm missing something?