12 ms·
Wasmer takes WebAssembly libraries mainstream with WAI
- j4ah4n 4y agoProbably a known thing for those already working with wasm but I had to install the rust nightly compiler and add the `wasm32-unknown-unknown` target to get this demo to work. It would be worth mentioning on the demo walkthrough. This link was helpful: https://www.hellorust.com/setup/wasm-target/ https://www.hellorust.com/setup/wasm-target/
- garganzol 4y agoI like the idea, but I do not like that it's for WASM only. What about other runtimes and languages? In general, I'm very skeptical about yet another runtime + component model combo. This makes the situation O(N^2) once again: every runtime has its own component model instead of having a standard component model that can be used from any runtime. This path has been deemed unsatisfactory far too many times: Java, .NET, BEAM etc (they're fine as long as you're inside the ecosystem). This is why we only have FFI as lingua franca between the languages. We cannot agree on a standard component model yet. And runtime has nothing to do with it.
- ChicagoDave 4y agoWeb Assembly capabilities are on the verge of replacing the entire browser development stack. No more html, css, typescript, or JavaScript. One of the best outcomes would allow app developers to avoid app stores and still provide native-like user experiences.
- laerus 4y agothat may eventually be true about JS but not really for HTML/CSS
- ChicagoDave 4y agoI guarantee someone is silently working on an alternate rendering engine. When it comes out, it’ll be a massive game changer like Google Maps was.
- esjeon 4y agoNot really “on the verge” considering how long it took to migrate most projects from Python2 to Python3. I mean, people won’t just drop existing projects, and adoption will be awfully slow.
- dmitriid 4y ago> replacing the entire browser development stack. No more html, css, typescript, or JavaScript. And how is it going to do that when wasm has literally no access to anything, except through browser's HTML, CSS, Javascript etc.?
- nsb1 4y agoJust give me a WebGPU backed canvas and I'll take it from there using the same toolkits I do for the desktop.
- dmitriid 4y ago> a WebGPU backed canvas WebGPU won't be available for a while. It's API is Javascript-only browser API. Canvas are only accessible through Javascript through the browser. Next question is: how are you going to accommodate accessibility?
- Kukumber 4y agoTo me WASM is only useful for webapps (games for example) Wasmer and others are just making things more confusing, bloated and slower, this is not how i envision WASM to be
- themgt 4y agoInteresting little discussion linked about this fork of WAI from wit-bindgen: https://github.com/bytecodealliance/wit-bindgen/issues/306 https://github.com/bytecodealliance/wit-bindgen/issues/306
- hardwaresofton 4y agoInteresting, sounds like the. Kubernetes in tree vs out of tree + CSI situation. In the end the real solution was this: > All host generators are being removed from this repository for example here and here. The JS generator will eventually move to its own repository as well, just takes time. Should have been what they did from the start, but I understand how they could have put it off. Thread was informative with regards to understanding where the rifts in the community are and how people think though.
- dlojudice 4y agowould it be possible, for example, to access the standard decimal library of C# or Python via Javascript, thus not having to wait for the TC39 spec / implementation? [1] [1] https://github.com/tc39/proposal-decimal https://github.com/tc39/proposal-decimal
- syrusakbary 4y agoDecimal values are not currently represented as a first-class type by WAI (as int, floats or string types are) but I believe it would be a great idea to do so. Would you mind opening an issue in the WAI repository [1] so we can follow up there? Thanks! [1] https://github.com/wasmerio/wai https://github.com/wasmerio/wai
- duped 4y agoWould this come under the WASI component model?
- the_duke 4y agoThe code you want to use has to compile to Webassembly. This is in fact possible for C# and Python, but especially in the browser you would want to have a small binary size, and avoid bringing along the whole runtime of these managed languages if all you want is a small functionality subset. A very viable solution would be creating a decimal package with either a native Rust crate (I think there are a few decimal implementations) or with one of the goto C libraries. That would be much smaller and faster as well.
- TachyonicBytes 4y agoIn her wasm summit presentation [1], Ashley Williams had a slide that showed a different picture. AssemblyScript came out with the smallest footprint, while Rust and C (through Emscripten) had bigger footprints--the slide is qualitative. An article posted last week on HN [2] also seems to support this hypothesis, this time with some numbers. The AssemblyScript program had 6% the filesize of the Rust program. So it seems like, if you want small wasm libraries, AssemblyScript may be your best shot. [1] https://youtu.be/J5Rs9oG3FdI?t=2133 [2] https://news.ycombinator.com/item?id=33761756
- qclibre22 4y agoI'm getting content blocked at work: Content blocked by [redacted] Reason: This Category is filtered: grayware Are there security concerns with wasmer.io ?
- syrusakbary 4y agoHey, Syrus here from Wasmer. This is the first time I'm hearing from this. No, there shouldn't be any security concerns in our website (it's actually fully open source as well [1], if you want to take a look) Do you happen to know what firewall does your work use? I'd love to follow up with them to make sure this is resolved asap [1]: https://github.com/wasmerio/wasmer.io https://github.com/wasmerio/wasmer.io
- qclibre22 4y agoNot sure what's up. No idea what the local filter software is. I'll fill out the local complaint form. wasm files are being served up from github.io , so wasm files, per se, are not the problem.
- benatkin 4y agoBehind every overly aggressive filter is an allowlist. GitHub would likely be the first addition.
- flohofwoe 4y agoI remember that a couple of years ago any wasm file hosted on any github page would be blocked by the EasyPrivacy list (apparently some idiots used github pages to host coin miners). Maybe it's a similar over-eager blocking rule.
- benatkin 4y agoUh oh, they still don't seem to have fully relinquished their claims to the name "WebAssembly". Their vscode package is listed under "WebAssembly Foundation". https://marketplace.visualstudio.com/publishers/dtsvet https://marketplace.visualstudio.com/publishers/dtsvet
- syrusakbary 4y agoIt's been this way for a little bit already (actually since 3 years ago! [1]). It was an intentional thing though, because we want to put this extension under a common group, not something that only Wasmer owns... that's why we haven't changed it yet. But I agree that probably using WebAssembly Foundation is perhaps not the best name :) [1]: https://github.com/wasmerio/vscode-wasm/commit/0f7f00f44aa722505a45eb0f783acf06b956d1b9 https://github.com/wasmerio/vscode-wasm/commit/0f7f00f44aa72...
- benatkin 4y agoWebAssembly Foundation is a misleading name. WebAssembly has a foundation, just not a separate one. It's W3C. https://en.wikipedia.org/wiki/WebAssembly https://en.wikipedia.org/wiki/WebAssembly I like that OpenJS Foundation is called OpenJS Foundation and not JS Foundation. That said, the main thing I object to is the trademark.
- syrusakbary 4y agoYou actually gave me a great idea! Perhaps we can rename it to OpenWasm Foundation (I think that's a great name, your suggestion inspired me). I will discuss with more people to see what name will make more sense to rename it to. And please let me know if you have other suggestions!
- benatkin 4y agoGood luck. I wouldn't mind having multiple organizations. The Bytecode Alliance is great but I would rather people recognize that WebAssembly belongs to the W3C (or everyone via the W3C if you prefer to think of it that way) and not them or the CNCF.
- klabb3 4y agoOne of the most exciting aspects of wasm is a safer and more expressive API surface for universal FFI. Currently, the lowest common denominator is the C ABI. In the future, it could be wasm. Obviously wasm can be much more, but just that alone can be really useful. * No custom language-A to language-B bindings necessary, only 1 wasm binding per lang. That's O(N) bindings in total, instead of O(N^2), which isn't feasible and that's why we don't have Julia-intercal or PHP-Java today (or maybe we do?)
- pjmlp 4y agoIBM and Unisys language environments on IBM i, z/OS, and ClearPath MCP, for 40 to 60 years, depending on the model. Amsterdam Compiler Toolkit, 40 years ago. CLR since 2002.
- garganzol 4y ago> Amsterdam Compiler Toolkit, 40 years ago. It provided only a plain C-like API, without OOP classes and stuff, pretty much like anyone else. > CLR since 2002 It's only for .NET, it's opinionated, so not a universal thing.
- pjmlp 4y agoNope, better educate yourself before replying. "The Amsterdam Compiler Kit (ACK) is a retargetable compiler suite and toolchain written by Andrew Tanenbaum and Ceriel Jacobs, since 2005 maintained by David Given. It has frontends for the following programming languages: C, Pascal, Modula-2, Occam, and BASIC." "The ACK's notability stems from the fact that in the early 1980s it was one of the first portable compilation systems designed to support multiple source languages and target platforms." "Maximum portability is achieved by using an intermediate language using bytecode, called EM. Each language front-end produces EM object files, which are then processed through several generic optimisers before being translated by a back-end into native machine code. ACK comes with a generic linker and librarian capable of manipulating files in the ACK's own a.out-based format; it will work on files containing EM code as well as native machine code. However, EM code cannot be linked to native machine code without translating the EM binary first. " -- https://en.wikipedia.org/wiki/Amsterdam_Compiler_Kit https://en.wikipedia.org/wiki/Amsterdam_Compiler_Kit "One of the exciting things in Visual Studio .NET is its language agnosticism. If a vendor has written a .NET-compliant language, you can use it in Visual Studio .NET. It'll work just as well as C# or C++ or Visual Basic. This isn't just a future feature-in-planning. There are already nearly two dozen languages being developed for Visual Studio .NET: Visual Basic, C#, C++, JScript, APL, Cobol, Eiffel, Fortran, Pascal, Perl, Python, RPG, Smalltalk, Oberon, Component Pascal, Haskell/Mondrian, Scheme, Mercury, Alice, and even the Java language." -- February 2002 issue of MSDN Magazine https://learn.microsoft.com/en-us/archive/msdn-magazine/2002/february/editor-s-note-welcome-visual-studio-net https://learn.microsoft.com/en-us/archive/msdn-magazine/2002... A common theme among WASM advocates....
- singularity2001 4y agowasmer add --pip wai/tutorial-01 Querying WAPM for package bindings error: Unable to find bindings for wai/tutorial-01@latest ╰─▶ 1: The package doesn't contain any bindings I guess one needs to publish a pip package? pip has very high requirements to publishing packages. the wai tutorial gives zero info on how to create a local pip package.
- syrusakbary 4y agoLooking into it. The command you posted should work: wasmer add --pip wai/tutorial-01 Will post as soon as we get it fixed. Thanks for letting us know EDIT: (+25 min) The command should be fully working now
- singularity2001 4y agoalmost. the command works but the import fails: /opt/wasm/wai/tutorial-01/ python3 consume.py Traceback (most recent call last): File "/opt/wasm/wai/tutorial-01/consume.py", line 2, in <module> from tutorial_01 import bindings File "/opt/homebrew/lib/python3.10/site-packages/tutorial_01/__init__.py", line 7, in <module> from wasmer import Store as _Store # type: ignore File "/opt/homebrew/lib/python3.10/site-packages/wasmer/__init__.py", line 1, in <module> raise ImportError("Wasmer is not available on this system") ImportError: Wasmer is not available on this system which wasmer /opt/homebrew/bin/wasmer wasmer -v wasmer 3.0.2
- syrusakbary 4y agoAlmost there! Are you in macOS m1/m2 by any chance?
- laerus 4y agoAh it's these guys that tried and still try to hijack the glory of webassembly just for their startup to succeed. Wasmer is doomed to fail cause it's leadership smells fishy. Btw a packaging solution has already started to be designed by the people that actually care about the wasm ecosystem, so it's not going to be wapm.
- syrusakbary 4y agoHi, I'm Syrus from Wasmer. I usually try not to get drawn into hate comments that don't add any value, but I'll make an exception today as it's sunny here in San Francisco! We care deeply about the Wasm ecosystem. In fact, we care so much that we are wary of putting it at mercy of the big tech. Wasm is a beautiful community that should embrace many points of view, starting from the Web and permeating back to the servers. I think is a strength to collaborate, to let developers with different points of view discuss without forcing one unique point of view on all. Unfortunately it will not be a surprise for some to learn that certain players on the industry want to force their unique perspective on the rest, where only "one way" is the right way of doing things. I'm betting my horses (I have two parked in the hallway), that the packaging initiative that you are talking about comes from these groups. Thankfully, Wasmer is probably one of the few companies with great context on how to do a Package Manager in WebAssembly (we started it 3 years ago, and got tons of learnings since then!), so just trying to replicate without collaboration seems like a big mistake (best of luck to them there!). In any case, I'm not the only person that feels this way and I know this feeling is shared by big part of the Wasm community. I wrote a bit more about this here as well: https://news.ycombinator.com/item?id=33805585 https://news.ycombinator.com/item?id=33805585
- remram 4y ago> hijack the glory of webassembly just for their startup to succeed What do you mean by that? What are they doing, apart from existing as a company in the webassembly ecosystem?
- EMM_386 4y agoI've been a developer for decades and I'm still getting highly confused by all of this WASM, Wasmer, WasmEdge, Wasmtime, etc. There was another one on the front page today that allowed you to use WASM to program other programming languages ("Extism: make all software programmable"). Where are we headed with all of this? I can see a future where WASM supports GC-languages, then you esentially have things like C# or Java desktop applications running "in the browser" via WASM? Doesn't that throw all of HTML, CSS, etc out the window? Honest question, sorry if it's dumb. But all these WASM terms, releases, etc. have me completely lost. I'll stick to my day job.
- dccoolgai 4y agoLots of great answers as to the "how" and "what" here, but here's a real short one for you to answer "why?": Capabilities Security model. It's absolutely ludicrous that all software doesn't run this way. One of those "so obvious, it sounds dumb" things, but that's what all this stuff is bringing imo. And I was an "I hate WASM and I'll never use it" person in the past.
- TillE 4y agoI still think, somehow or another, capability-based microkernels are the future of computing. There have been many attempts, though the most serious one is probably Google's Fuchsia. Maybe they'll gain some new life as a natural home for WASM.
- pjmlp 4y agoActually type 1 hypervisors running cloud workloads happen to the be most successful microkernels, but monolithic defenders still haven't got it.
- DefineOutside 4y agoEaglercraft is an early example of a java program compiled to WebAssembly to run in the browser. It's Minecraft 1.5.2
- 4y ago
- RcouF1uZ4gsC 4y agoBetween WebAssembly, Cloudflare Durable Objects/Workers are the equivalents from Fly.io, it seems we are finally recreating the features of IBM System/360 mainframe from 50 years ago, in terms of portable code that could run reliably and scalably even with faulty hardware. WebAssembly is the modern 360 Assembler that allows you to compile once and run anywhere. (Kubernetes is the modern JCL)
- pjmlp 4y agoIncluding reselling language environments as something novel.
- TobyTheDog123 4y agoI'm not entirely convinced Wasmer will ever be able to shake its constant controversies. I'm by no means a fan of the Bytecode Alliance, and would much prefer a startup tackle the problems that Wasmer is tackling, but between the trademarks [1], the lackluster response to the trademarks (How did you not know your lawyers were trying to trademark “WebAssembly”? Seriously?) [2], the working conditions [3], the drama surrounding the BCA [4][5], and everything else, I don't think Wasmer is the right choice either, at least not under current leadership. [1] https://uspto.report/company/Wasmer-Inc https://uspto.report/company/Wasmer-Inc [2] https://wasmer.io/posts/wasmer-and-trademarks https://wasmer.io/posts/wasmer-and-trademarks [3] https://mnt.io/2021/10/04/i-leave-wasmer/ https://mnt.io/2021/10/04/i-leave-wasmer/ [4] https://github.com/wasmerio/wasmer/issues/956 https://github.com/wasmerio/wasmer/issues/956 [5] https://github.com/WebAssembly/WASI/issues/3 https://github.com/WebAssembly/WASI/issues/3