Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugings using wasm #10054

Closed
3 tasks done
gedw99 opened this issue Aug 4, 2023 · 8 comments
Closed
3 tasks done

Plugings using wasm #10054

gedw99 opened this issue Aug 4, 2023 · 8 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature kind/stale need/author-input Needs input from the original author

Comments

@gedw99
Copy link

gedw99 commented Aug 4, 2023

Checklist

  • My issue is specific & actionable.
  • I am not suggesting a protocol enhancement.
  • I have searched on the issue tracker for my issue.

Description

RE: https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#plugins

Wazero is 100% golang and can run wasm on anything. even mobile.

Making plugins that are compiled to wasm is pretty easy these days, as well as how they are exposed.

for a P2P system it also means that you don't need to trust the plugins because they are sandboxed.

lots of wazero frameworks out there too: https://github.com/tetratelabs/wazero/blob/main/site/content/community/users.md?plain=1

The best one that i use is https://docs.timecraft.dev

@gedw99 gedw99 added the kind/enhancement A net-new feature or improvement to an existing feature label Aug 4, 2023
@Jorropo
Copy link
Contributor

Jorropo commented Aug 4, 2023

@gedw99 we are not intrested in wasm for the sake of having wasm.

We would review each plugin usecase one by one. What would like to do with a wasm plugin ?

@Jorropo Jorropo added the need/author-input Needs input from the original author label Aug 14, 2023
@Jorropo
Copy link
Contributor

Jorropo commented Aug 15, 2023

Note about https://github.com/ipfs/kubo/blob/master/docs/experimental-features.md#plugins, this can't work for wasm plugins, this is using golang's builtin plugin system, this is not cross ABI compatible, you can't load a wasm plugin into an amd64 binary, this isn't easily 1 to 1 mappable since our code internally relies on reflection and type assertions.

We don't have the resource to enginer a complex solution that would modify go's runtime to permit to do that.

Thus that why if usecases needs to be viewed one by one.

@github-actions
Copy link

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@gedw99
Copy link
Author

gedw99 commented Aug 22, 2023

P2p computing where you bring the compute to the data .

@Jorropo
Copy link
Contributor

Jorropo commented Aug 22, 2023

That is different from plugins and require widely different technical works: trusted vs untrusted code, state and lifecycle are completely different.


Here we are looking for API and technical designs of what we would implement.

@aschmahmann
Copy link
Contributor

P2p computing where you bring the compute to the data .

@gedw99 building off of @Jorropo's comments above you can already build a number of different plugins using these interfaces https://github.com/ipfs/kubo/blob/master/docs/plugins.md#plugin-types and have the plugin use a WASM runtime and dynamically load and execute code for you if you'd like. So if you're looking for something more that would mean describing something specific in order to match.

My issue is specific & actionable.

For example:

  • Maybe you wanted an IPLD plugin type like [Experiment] WASM IPLD Codecs and ADLs #9016, which means that the issue is defining an IPLD codec and/or ADL ABI
  • Maybe you want a way to hook up custom CLI commands in Go so you can leverage IPVM (https://github.com/ipvm-wg/) or some other tool to execute WASM for a defined ABI (although presumably you could also just leverage stock kubo or build a boxo-based binary to do something similar)
  • ...

Which is why

Here we are looking for API and technical designs of what we would implement.

If you're looking for more general community feedback on what using kubo + WASM together might look like https://discuss.ipfs.tech/ or some of the community chat channels are probably better places to start.

@github-actions
Copy link

github-actions bot commented Sep 4, 2023

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

@github-actions
Copy link

This issue was closed because it is missing author input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature kind/stale need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

3 participants