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

feat: plugin system #1959

Closed
wants to merge 3 commits into from
Closed

Conversation

tbruyelle
Copy link
Contributor

Hello guys,

here is the PR for the plugin system I wrote for the HackAtom. I don't know exactly how you want to merge it, since it's not a tiny change, so feel free to tell me. We can do a regular review where you ask for changes, or maybe you prefer to merge like it is and improve it later.


The change introduces a plugin system to starport.

A plugin is a binary that can communicate with starport using
github.com/hashicorp/go-plugin. When starport is executed under a chain
configuration, it checks if the config contains plugins. If yes the
plugins are fetched, compiled and ran, which will add more commands to
the existing ones.

Fetching and compilation are cached under .starport/plugins folder.

A new command starport plugin has been added to manage plugins and make new
ones.

To give plugins the ability to load the chain, the function
cmd.NewChainWithHomeFlags is now public.

The change introduces a plugin system to starport.

A plugin is a binary that can communicate with starport using
github.com/hashicorp/go-plugin. When starport is executed under a chain
configuration, it checks if the config contains plugins. If yes the
plugins are fetched, compiled and ran, which will add more commands to
the existing ones.

Fetching and compilation are cached under .starport/plugins folder.

A new command `starport plugin` has been added to manage plugins and make new
ones.

To give plugins the ability to load the chain, the function
`cmd.NewChainWithHomeFlags` is now public.
@ilgooz ilgooz linked an issue Jan 3, 2022 that may be closed by this pull request
@ilgooz ilgooz marked this pull request as draft May 10, 2022 20:20
@tbruyelle
Copy link
Contributor Author

rebased in a new PR #2877

@tbruyelle tbruyelle closed this Oct 3, 2022
@aljo242 aljo242 mentioned this pull request Nov 7, 2022
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a Plugin System
3 participants