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(example): add rust custom provider template #2173

Merged
merged 3 commits into from
May 24, 2024

Conversation

brooksmtownsend
Copy link
Member

@brooksmtownsend brooksmtownsend commented May 23, 2024

Feature or Problem

This PR adds a "blank slate" capability provider that's purpose made to inform deeply how to use the wasmcloud-provider-sdk, and where each piece fits into implementing a custom provider. I've included a test component as well in order to try out the provider, and a few workflows to get started quickly with writing and debugging a custom capability.

There will be two followups to this PR:

  1. Mirroring this exact example with the provider-sdk-go, and a tinygo component, to give another comprehensive guide
  2. Documentation on https://wasmcloud.com on the workflow that I have in mind, being 1. use wash new to generate this template, 2. update the WIT to fit a custom interface based on an idea, 3. implement the new logic, 4. run

edit: renamed all instances of "blank slate" to "custom template" to better indicate the purpose.

Related Issues

Release Information

Consumer Impact

Testing

Unit Test(s)

Acceptance or Integration

Manual Verification

I ran through these READMEs and the application flow, but more testing is appreciated!

Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
@brooksmtownsend brooksmtownsend marked this pull request as ready for review May 24, 2024 16:09
@brooksmtownsend brooksmtownsend requested a review from a team as a code owner May 24, 2024 16:09
@vados-cosmonic
Copy link
Contributor

Hey @brooksmtownsend what do you think about the name? blank-state is OK but maybe... template or example might be nice?

@brooksmtownsend
Copy link
Member Author

@vados-cosmonic Honestly I'm not too dedicated to blank slate 😄 Template is good, I think just something that provides the message that this is a sample but meant to be used as a "base" for a custom provider is perfect

@vados-cosmonic
Copy link
Contributor

vados-cosmonic commented May 24, 2024

Oh also another thing I was thinking is that this is will be an input to wash new right? so a more generic name like that might be very useful/good for docs

@brooksmtownsend
Copy link
Member Author

Oh also another thing I was thinking is that this is will be an input to wash new right? so a more generic name like that might be very useful/good for docs

Good point. Perhaps it could be custom-template, is that too generic?

@vados-cosmonic
Copy link
Contributor

Hmnnn IMO just template works fantastic there -- wash new provider template is pretty intuitive looking...

Though I can think of some others?

wash new provider boilerplate
wash new provider skeleton?

template makes more sense as a folder name in the repo, but skeleton or boilerplate make more sense on CLI... maybe we can just alias those other names to template.

@brooksmtownsend
Copy link
Member Author

Ooh I do like the idea of wash new provider myprovider -t template-rust or wash new provider myprovider -t template-go

@brooksmtownsend brooksmtownsend requested a review from a team as a code owner May 24, 2024 19:17
@brooksmtownsend brooksmtownsend changed the title feat(example): add blank slate rust provider feat(example): add rust custom provider tempalte May 24, 2024
@brooksmtownsend brooksmtownsend changed the title feat(example): add rust custom provider tempalte feat(example): add rust custom provider template May 24, 2024
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>

fix health topic

Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
Signed-off-by: Brooks Townsend <brooksmtownsend@gmail.com>
Copy link
Contributor

@vados-cosmonic vados-cosmonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, fantastic example for building providers!

LGTM 🚀

@brooksmtownsend brooksmtownsend merged commit 1274766 into main May 24, 2024
81 checks passed
@brooksmtownsend brooksmtownsend deleted the feat/blank-slate-providers branch May 24, 2024 19:48
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.

None yet

2 participants