Open yoshuawuyts opened 5 days ago
Since this is wasi-http specific could we rename it to rust-wasi-http-sample
?
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: {language}-{world}-sample
.
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.
Proposing the adoption of rust-wasi-sample as a Bytecode Alliance hosted project.
Repository URL: https://github.com/yoshuawuyts/wasi-rust-sample
This is represents a simple "hello world" HTTP component written in Rust. It is available as a GitHub template, has support for GitHub code spaces, and will automatically build and push new OCI images on release. Rust shouldn't be the only language we build samples for, but it is a good first language to start with. The sample isn't yet complete either, but by moving it into the BA we can expand the contributor base and elevate its visibility.
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
.