Loungy icon indicating copy to clipboard operation
Loungy copied to clipboard

Plugin support

Open srid opened this issue 1 year ago • 10 comments

Congrats on open sourcing what appears to be a viable open source alternative to Raycast!

Mostly as a learning/hobby project. It isn't (yet) intended to be used outside of experimentation. I got the idea while writing a Raycast plugin and getting frustrated with their limitations.

If you ever wish to take this beyond a personal hobby project, it would be great to add support for user-written plugins. How about Rust WASM (in addition to whatever friendlier way to write plugins)?

srid avatar Feb 07 '24 18:02 srid

Jup for sure worth exploring. I definitely need more time to flesh out how things are going to work before thinking about making things more complicated by implementing a plugin system which would require some stable API...

MatthiasGrandl avatar Feb 07 '24 18:02 MatthiasGrandl

Wow yeah this is amazing. I'm new to Rust and wouldn't be of much help in developing a plugin system but I want to second that idea, there is definitely a lot of interest in moving away from Raycast for me and for many others!

uncenter avatar Feb 07 '24 19:02 uncenter

@MatthiasGrandl This quite looks interesting for wasm plugin support: https://extism.org/

srid avatar Feb 19 '24 16:02 srid

I would recommend instead just going for web assembly components. I have a project I have been hacking on to test them and you simply define an interface in their IDL (wit) and then use their bindgen tools to generate rust interfaces to implement.

https://github.com/arlyon/litehouse/blob/main/crates/plugin-macro/wit/plugin.wit

arlyon avatar Apr 03 '24 10:04 arlyon

@arlyon do you have some recommended resources to read up on webassembly components? It does sound like a good fit.

MatthiasGrandl avatar Apr 04 '24 06:04 MatthiasGrandl

There is a bunch of scattered work but it is still quite new (though capable) so it takes a bit of digging sometimes. I want to stress it is very early days still but already quite functional.

  • https://www.youtube.com/watch?v=zqfF7Ssa2QI
  • https://component-model.bytecodealliance.org/design/wit.html
  • https://github.com/bytecodealliance/wit-bindgen

The really nice thing with wit is being able to expose host apis to plugins (such as networking, the filesystem, or any other arbitrary functions). if you don't want to give a plugin network access it can't have it, and they are pretty lightweight since they can share the http stack with the host.

arlyon avatar Apr 04 '24 16:04 arlyon

i started workng on this using webassembly components! It's quite a huge refactor, but I am optimistic that it will improve the code base a lot.

MatthiasGrandl avatar Aug 03 '24 04:08 MatthiasGrandl