extism icon indicating copy to clipboard operation
extism copied to clipboard

Package Manager for distributing Wasm files

Open AramRafeq opened this issue 3 years ago • 5 comments

Hi, This project is inspiring, I usually develop backend applications using javascript and am used to npm I was wondering if there are anything like npm for web assembly files/packages if not

  • What are the possibilities of developing a wasm registry?
  • Is it a good idea?
  • Do you think that it is necessary?
  • What should the MVP contain for a wasm registry?
  • Is it aligned with the purpose/vision of extism?

Apologies if this issue is out of context and place

AramRafeq avatar Dec 04 '22 20:12 AramRafeq

Apologies if this issue is out of context and place

This is definitely the right place and context for this, thanks for bringing it up!

@AramRafeq - this is a great idea, and something we want to put more thought into. There is already the WAPM registry, https://wapm.io, although it seems fairly tightly integrated to Wasmer, which doesn't necessarily preclude us from using it, but I do think there is room for something Extism-specific.

There is also WARG https://warg.io/, although I don't know exactly the status of this. And it is focused on Components, which Extism does not currently leverage.

To expand, would you mind sharing some of your thoughts about what the implementation of such a package manager would look like? Are you thinking about a full-featured npm system including:

  • CLI
  • Web interface
  • API to power intake, validation, search, web app
  • User accounts / namespacing
  • Storage

I'm sure I'm missing some elements, but I think it would help us to understand more about what you envision.

nilslice avatar Dec 05 '22 18:12 nilslice

@nilslice Thank you for the clarification & the support my thoughts can be summarized for the product in bellow point's

  • It should allow complete integration with extism however it can be also used as standalone tool for downloading binaries
  • It should provide a CLI tool for all platforms
  • It should support Binary/Package versioning
  • It should provide a way for companies and teams to share private binaries within an organization like npm private packages
  • The CLI should handle publishing of packages and managing updates
  • It should have a web interface
  • Github Actions can be introduced for handling build, validate, deliver to this package manager
  • It can track downloads just like npm

I may have missed some core points but my initial thoughts are as above I am open to new suggestions/ideas so that we can write down specifications for such a product

Disclaimer: I am very new to wasm concept and haven't used it in production thus i may be ignorant on some of the core point s

AramRafeq avatar Dec 05 '22 19:12 AramRafeq

Hi @AramRafeq - sorry for the delay here. I think this would be a very useful resource for Extism users!

Have you tried to package an Extism plugin for https://wapm.io yet? I would be curious about your experience there and if you think there is some functionality that is missing which would be helpful for Extism users!

nilslice avatar Dec 09 '22 17:12 nilslice

@nilslice sorry for the late replay I will be doing some experiments and identifying what will be best to do

AramRafeq avatar Dec 22 '22 09:12 AramRafeq

I am using aqua as a wasm registry and proxy.

So you can call a wasm as if it’s on disk and aqua will pull it down from the registry and then let the call through once it’s on disk.

The big one is that you can have many versions of the same wasm on disk .

https://github.com/aquaproj/aqua

it’s design for binaries not wasm but it works fine.

gedw99 avatar Sep 10 '23 08:09 gedw99

We're not currently looking to provide this as a service or an implementation of this to extism users. Although it's a lot more than just a registry, we're working on a new product that will handle a lot of plugin management stuff as a service called XTP: https://www.getxtp.com/

Having said that, Extism is it's own open community and we would like to support other ways of getting plug-ins. I think something ideal would be a solution like this that re-uses an open registry:

  • a tool to package an extism plugin into an npm module
  • a new option in the Manifest to load a plugin from npm

If anyone has any ideas or wants to tackle this, feel free to open another issue or reach out to us in Discord. We can collaborate on a proposal and work on a solution together.

bhelx avatar Jun 14 '24 19:06 bhelx