-
Notifications
You must be signed in to change notification settings - Fork 36
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
Hosted Project Proposal: language-specific wasi:http
samples
#113
Comments
Since this is wasi-http specific could we rename it to |
Including the name of the world makes sense to me. I mainly want to make sure we also set ourselves up to host samples for Go, C#, JS, etc. If we generalize that to a scheme, it sounds like that might become something like: |
Do we need a separate project / repo for each of those? Or can we maintain a single samples repo? |
This sample is setup as a GitHub Template: that makes it a single click to start modifying the sample to build your own. I think that's incredibly valuable, and we can't do that well if we put all samples in a monorepo. I think it also makes the sample feel more targeted/realistic if it's language-specific. |
Ah, ok, I didn't understand that Template was limited in that way, which is sorta a bummer but I guess it makes sense. |
By the way, I'm not sure if this was clear from the description, but I hope that on the hosting side individual host projects will end up creating their own samples to run these applications. E.g. I think it'd be great if there are dedicated samples for {spin, wasmcloud} on {AWS, Azure, Gcloud} and so on. If we can link to these the getting started flow can just become:
With colleagues at Azure we're currently also working on an initial sample for running Wasm HTTP Components on AKS, which should provide an initial end-to-end flow people can use. |
Thank you for the very kind offer to contribute this project to the BA! ❤️ I (for now personally, not speaking on behalf of the TSC) think this would be a great addition. Organization-wise, I agree with Pat that perhaps this doesn't need to be its own project. The key bit is that BA projects don't have a 1:1 mapping to repositories: a single project can span multiple repos, and a single repo can contain multiple projects. Given this, would you perhaps be up for generalizing the proposed project definition here a bit to make it describe an umbrella project? A potential idea could also be to bring this up with SIG-Documentation to see if there's interest in helping maintain sample projects. |
We discussed this in the TSC call this week, and have strong agreement that we'd love to have this hosted in the BA. The details are a bit more open: for one, we agreed that it'd make sense to have this sort of example be part of a larger effort that'd form a single hosted project, instead of going through the application process for each of them. We also agreed that it might indeed make sense to coordinate this with SIG-Documentation, which we could see as a good forum for collaborating on examples in general. The other, more involved part is that thus far, the BA has been careful about not taking stances on how to use any of the tools and approaches we develop in the context of non-BA tools or platforms. What you're proposing would change that, and is something we'll need to think through a bit more. Would it be okay for now to start coordinating with SIG-Documentation on how to structure examples like this, while focusing on wasmtime based scenarios instead of ones involving external platforms or tools? |
@tschneidereit thanks for your response! Happy to further generalize the proposal text and happy to talk to SIG-Documentation. To clarify my earlier comment: I do not expect the BA to maintain any runtime-specific samples. Something like "Spin on Azure Kubernetes Service" would best be maintained by either Azure or Fermyon, not the BA. What I want the BA to host is canonical guest samples for various programming languages. And potentially also host samples for BA-hosted runtimes. However since WASI is still early in its adoption cycle, I do believe there is a lot of value in creating visibility for samples. And so I think it would be a good idea if we could make sure we are linking to the various samples, even if they're not hosted by the BA. |
That all sounds absolutely perfect to me, and is very well aligned with how we talked about it in the last TSC meeting.
Thank you for the clarification, that helps! It seems like we have sorted what we need to be sorted here for now, and the next step is coordination with SIG-Documentation? |
Great, I'm glad to hear that! I've reached out to them on Zulip in the |
wasi:http
samples
Based on feedback from the TSC: changed the wording in the proposal to cover more I think that covers all outstanding comments. |
Proposing the adoption of
wasi:http
samples as a BA hosted project, startingwith a sample for Rust.
Repository URL: https://github.com/yoshuawuyts/wasi-rust-sample
One of the main use cases for WASI today is for writing HTTP handlers. The
promise is that these handlers can be language-specific, use language
best-practices, all while still targeting the portable and language agnostic
WASI platform. In order to help guide users get started with WASI using their
programming language of choice, we want to give them all the tools necessary not
just to get started - but to succeed.
This hosted project proposes the addition of
wasi:http
-specific samples to theBA's GitHub org. The structure for this is a single repository per programming
language, as that makes it possible to be cloned directly as a GitHub Template,
modified using GitHub CodeSpaces, and publish to GitHub Artifacts. This
significantly lowers the bar to get to production-grade deployments.
The first sample will be authored in Rust, as tooling for that is far along
already. But our expectation is to author additional samples for other
programming languages in due time as well.
Requirements
Alignment with the Bytecode Alliance Mission
This sample supports these goals.
Code Review
Description
We include a CODEOWNERS file and will respond to issues, PRs, and other user in line with the requirements stated here
Code of Conduct
We have adopted the BA CoC.
Continuous Integration Testing
We have CI setup, though we intend to improve if further. Part of the reason why we're upstreaming this sample is to collaborate and improve the standard Component flows - and that includes testing too. The fact that this takes some effort to do correctly is exactly what we're hoping to improve.
Contributor Documentation
We include a
CONTRIBUTING.md
.Following the Bytecode Alliance Operational Principles
We follow the operating principles. Our intent with this sample is to establish a first language-specific sample, that can be replicated by other languages / interfaces too.
Licensing Compatible with the Bytecode Alliance
We've adopted the Apache-2.0 license with LLVM exception.
README
We meet these requirements.
Release Process
Our sample includes automated releases - uploading components to registries is an important part of the core flow.
Security Process
We have configured dependabot
Semantic Versioning
We follow semantic versioning.
Secrets Management
We do not manage any secrets nor do we plan to.
Supply Chain Security
We intend to show how to configure, store, and manage bill of materials - but that's not yet part of the MVP of the sample. We do intend to add this, with the purpose of educating Component authors how to manage SBOMs themselves.
Sustainable Contributor Base
This sample has multiple contributors - albeit all from a single company (Microsoft). We expect more people will contribute to this once it's upstreamed, as for example it shows some of the limitations of
cargo-component
. If we do it right, we should be able to fix those issues and simultaneously update the sample. Though this sample exists in a separate repo, it is heavily tied to the other projects in the BA.Version Control
Once this project is accepted, we will move the project over.
Recommendations
Changelog
We currently don't keep a changelog - though that's something that would be neat to automate as part of the release process. We agree that keeping changelogs is a good thing, and at a minimum want to make it easy for users of the sample to keep one - even if it's just a list of pull requests.
Continuous Fuzzing
This is a sample showing how to use other tools. We wouldn't benefit much from directly fuzzing 24/7, instead it seems better to transitively rely on the projects we are showcasing being thoroughly tested and fuzzed.
End-User Documentation
This project itself is documentation in the form of both code and prose.
Issue Triage Process
We have an issue tracker.
Leverage the Bytecode Alliance RFC Process
TODO: discussion of this recommendation and any supporting evidence (such as links to code, documentation, issues, and pull requests)
Production Use
The purpose of this sample is to increase the production use of existing projects.
Public Project Meetings and Notes
Samples probably don't need their own individual project groups, as they intend to reflect the usage and best practices of other, existing tools. Those tools have their own meetings and logs, and we expect most of the conversations and decisions to be made in those groups - and only once completed will those changes be represented in the sample.
Sanitizers and Code Analysis
We do not use unsafe code, but we do apply various other static analysis tools such as
rustfmt
andclippy
.The text was updated successfully, but these errors were encountered: