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

Support asdf plugins through a proto WASM plugin #9

Open
milesj opened this issue Aug 18, 2024 · 3 comments
Open

Support asdf plugins through a proto WASM plugin #9

milesj opened this issue Aug 18, 2024 · 3 comments

Comments

@milesj
Copy link
Contributor

milesj commented Aug 18, 2024

There has been multiple requests now to support (piggy-back) off of asdf, since it has a ton of plugins and support for many tools. Unfortunately, building this into proto core simply isn't feasible without rewriting it from scratch, and at that point, it's really not worth it. The other issue is that asdf is Unix only, so that means no Windows support.

However! I had a thought the other day, why not support every asdf plugin through a single proto WASM plugin, similar to how our TOML plugins work (they are WASM under the hood). For example, say you wanted to use the scala asdf plugin, it may look something like the following in proto:

# .prototools
scala = "latest"

[plugins]
scala = "https://path/to/asdf/plugin.wasm"

Easy right? But what if the proto identifier doesn't match up with the asdf plugin name? Well, just override it with configuration. For example, using the nodejs asdf plugin.

# .prototools
node = "latest"

[plugins]
node = "https://path/to/asdf/plugin.wasm"

[tools.node]
asdf-plugin = "nodejs"

We can also take this further by supporting the git repository directly.

# .prototools
[tools.node]
asdf-repository = "https://github.com/asdf-vm/asdf-nodejs.git"

Caveats

With all this being said, I have no idea if this will actually work, or if the asdf plugin APIs will match up to the proto plugin APIs. It's definitely something that needs to be prototyped to ensure it's feasible.

Requirements

Implementation

How this is implemented may require a lot of discussion, which can be had on Discord.

With that said, we can outline a few things:

@milesj
Copy link
Contributor Author

milesj commented Aug 18, 2024

/bounty $500

Copy link

algora-pbc bot commented Aug 18, 2024

💎 $500 bounty • moonrepo (YC W23)

Steps to solve:

  1. Start working: Comment /attempt #9 with your implementation plan
  2. Submit work: Create a pull request including /claim #9 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to moonrepo/tools!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @varshith257 Aug 19, 2024, 4:34:03 AM WIP

@varshith257
Copy link

varshith257 commented Aug 19, 2024

@milesj Instead you have transferred the issue. Almost done except installation changes. I am presuming my work of last done and push changeS
s. With that

/attempt #9

Algora profile Completed bounties Tech Active attempts Options
@varshith257    3 moonrepo bounties
+ 5 bounties from 3 projects
TypeScript, Go
Cancel attempt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants