|
| 1 | +# Summary |
| 2 | + |
| 3 | +This RFC proposes that we: |
| 4 | + |
| 5 | +- Move crates that are widely used in the embedded ecosystem into the [rust-embedded] organization |
| 6 | + |
| 7 | +- Significantly expand the membership of the rust-embedded org and organize the members into teams |
| 8 | + focused in different areas. |
| 9 | + |
| 10 | +- Create guidelines for developing and maintaining the crates in the rust-embedded org. |
| 11 | + |
| 12 | +- Settle on a policy for the inclusion of new crates and creation of new teams. |
| 13 | + |
| 14 | +[rust-embedded]: https://github.com./rust-embedded |
| 15 | + |
| 16 | +# Detailed design |
| 17 | + |
| 18 | +## Teams |
| 19 | + |
| 20 | +### Role |
| 21 | + |
| 22 | +- The role of a team is to oversee the development of the crates under their purview. With input |
| 23 | + from stakeholders they set the development roadmap of each crate assigned to them. |
| 24 | + |
| 25 | +- The members of a team are the main reviewers of the crates assigned to the team. Teams are |
| 26 | + free to add collaborators (reviewers) to the repositories they oversee, and to increase / modify |
| 27 | + their membership as they see fit. |
| 28 | + |
| 29 | +- The team is in charge of publishing new versions of the crates they oversee to crates.io, and of |
| 30 | + maintaining the CHANGELOG of the project. |
| 31 | + |
| 32 | +### Membership |
| 33 | + |
| 34 | +- For visibility, the membership of each team, along with the set of crates they oversee, will be |
| 35 | + listed in the README of the rust-embedded/wg (previously known as rust-lang-nursery/embedded-wg) |
| 36 | + repository. |
| 37 | + |
| 38 | +- To expand the membership of a team the candidate will send a PR to the rust-embedded/wg repository |
| 39 | + modifying the README to add themselves as a new member. The current members of the team will |
| 40 | + review the PR. If all the members approve the PR will be merged and the membership change will be |
| 41 | + made effective. |
| 42 | + |
| 43 | +### The triage team |
| 44 | + |
| 45 | +A special team named `triage` will be also be created. This team has the *very* important task of |
| 46 | +keeping the PR queues moving and making sure no PR gets stuck in the review limbo. |
| 47 | + |
| 48 | +- This team will consist of volunteers that will triage open PRs to rust-embedded repos on a weekly |
| 49 | + basis. |
| 50 | + |
| 51 | +- The `triage` team can't review PRs; they can only change the labels of the PR and comment on the |
| 52 | + PRs. |
| 53 | + |
| 54 | +- The `triage` team will follow the triage process used in [the rust-lang/rust repo]: |
| 55 | + - Open PRs will get assigned one of these status label: `S-waiting-on-author` or |
| 56 | + `S-waiting-on-reviewer`. |
| 57 | + - If the PR has no assigned reviewer assign a reviewer and set the `S-waiting-on-reviewer` label. |
| 58 | + - If around a week has passed since a reviewer was assigned ping the reviewer to remind them about |
| 59 | + the PR. |
| 60 | + - If the reviewer requested changes to the PR apply the `S-waiting-on-author` label. |
| 61 | + - If around a week has passed since changes were requested ping the author to remind them that |
| 62 | + changes are needed. |
| 63 | + - If the author made the requested changes change the label to `S-waiting-on-reviewer`. |
| 64 | + - If the author hasn't responded to pings for over two weeks, close the PR. |
| 65 | + |
| 66 | +[the rust-lang/rust repo]: https://github.com./rust-lang/rust/pulls |
| 67 | + |
| 68 | +## Crate inclusion policy |
| 69 | + |
| 70 | +Only crates that are widely used and / or that have a wide scope will be maintained by the |
| 71 | +embedded-rust org. Additionally, the crate must compile on stable Rust 1.31. In principle, this |
| 72 | +excludes HAL implementations crate like the [`stm32f103xx-hal`] but exception can be made for crates |
| 73 | +with narrow scope, like the [`f3`] crate, that are used by widely used resources like the |
| 74 | +[`discovery`] book. |
| 75 | + |
| 76 | +[`stm32f103xx-hal`]: https://github.com./japaric/stm32f103xx-hal |
| 77 | + |
| 78 | +The procedure to add a crate is similar to the one used to add a new member to a team. The author |
| 79 | +of the crate will make a PR modifying the README of the rust-embedded/wg repo. The team that |
| 80 | +will adopt the crate will review the PR. If everyone accepts, the PR will be merged, the author will |
| 81 | +transfer ownership of the repo to the org, and the author will become a collaborator. |
| 82 | + |
| 83 | +## Reviewing guidelines |
| 84 | + |
| 85 | +- The `master` branches will be protected and can't be directly pushed to. |
| 86 | + |
| 87 | +- All changes will go through a PR, which must pass review and [bors] before landing. A team member |
| 88 | + / collaborator can't review / approve their own PR. |
| 89 | + |
| 90 | +[bors]: https://bors.tech |
| 91 | + |
| 92 | +- Breaking and major changes must be consulted with other team members, reviewers and stakeholders |
| 93 | + before the PR is reviewed. A mini [RFC] must be written listing the rationale of the change and |
| 94 | + the alternatives. |
| 95 | + |
| 96 | +[RFC]: https://github.com./rust-lang/rfcs#table-of-contents |
| 97 | + |
| 98 | +- Mandatory: Read the [Rust API guidelines] before you start reviewing PRs that add new API. |
| 99 | + |
| 100 | +[Rust API guidelines]: https://rust-lang-nursery.github.io/api-guidelines/about.html |
| 101 | + |
| 102 | +## Publishing guidelines |
| 103 | + |
| 104 | +- Publish patch releases (bug fixes) often. |
| 105 | + |
| 106 | +- Publish minor releases as soon as all the new features have been properly documented. |
| 107 | + |
| 108 | +- Try to avoid *frequent* major (breaking) releases. Collect several breaking changes into a single |
| 109 | + major release. |
| 110 | + |
| 111 | +- Before publishing a breaking release, read [semver-trick] and apply it to minimize breakage. |
| 112 | + |
| 113 | +[semver-trick]: https://github.com./dtolnay/semver-trick |
| 114 | + |
| 115 | +## Repository guidelines |
| 116 | + |
| 117 | +- The README of all repositories will indicate which team is in charge of the repository and it will |
| 118 | + link to the teams sections of the README of the rust-embedded/wg repo. |
| 119 | + |
| 120 | +- All the repositories that are crates will maintain a CHANGELOG.md file that adheres to the [keep a |
| 121 | + changelog] format. |
| 122 | + |
| 123 | +[keep a changelog]: https://keepachangelog.com/en/1.0.0/ |
| 124 | + |
| 125 | +- The repository will include a copy of Rust [Code of Conduct]. Each team will enforce the code of |
| 126 | + conduct in the repositories they govern. |
| 127 | + |
| 128 | +[Code of Conduct]: https://github.com./rust-lang/rust/blob/master/CODE_OF_CONDUCT.md |
| 129 | + |
| 130 | +- Where appropriate the repositories will adopt the 2018 milestones used in the rust-embedded/wg |
| 131 | + repository. |
| 132 | + |
| 133 | +## Initial organization |
| 134 | + |
| 135 | +Based on current ownership, collaborator-ship and recent activity. |
| 136 | + |
| 137 | +> @japaric: this is off the top of my head. If I forgot about you, sorry! Also, the proposed teams |
| 138 | +> are too small. I expect teams will be much larger once we get this RFC in motion. |
| 139 | +
|
| 140 | +- `embedded-linux` team |
| 141 | + - Crates: [`spidev`], [`sysfs-gpio`], [`rust-sysfs-pwm`], [`i2cdev`], [`linux-embedded-hal`][] |
| 142 | + (+@japaric) |
| 143 | + - Members: @nastevens, @posborne |
| 144 | + |
| 145 | +[`spidev`]:https://github.com./rust-embedded/rust-spidev |
| 146 | +[`sysfs-gpio`]: https://github.com./rust-embedded/rust-sysfs-gpio |
| 147 | +[`rust-sysfs-pwm`]: https://github.com./rust-embedded/rust-sysfs-pwm |
| 148 | +[`i2cdev`]: https://github.com./rust-embedded/rust-i2cdev |
| 149 | +[`linux-embedded-hal`]: https://github.com./japaric/linux-embedded-hal |
| 150 | + |
| 151 | +- `hal` team |
| 152 | + - Crates: [`embedded-hal`], [`linux-embedded-hal`], [`stm32f30x-hal`] |
| 153 | + - Members: @therealprof, @hannobraun, @japaric |
| 154 | + |
| 155 | +[`embedded-hal`]: https://github.com./japaric/embedded-hal |
| 156 | +[`stm32f30x-hal`]: https://github.com./japaric/stm32f30x-hal |
| 157 | + |
| 158 | +- `tools` team |
| 159 | + - Crates: [`svd2rust`][] (+@Emilgardis, +@ryankurte), [`cargo-binutils`], [`itm`] |
| 160 | + - Members: @therealprof, @japaric |
| 161 | + |
| 162 | +[`svd2rust`]: https://github.com./japaric/svd2rust |
| 163 | +[`cargo-binutils`]: https://github.com./japaric/cargo-binutils |
| 164 | +[`itm`]: https://github.com./japaric/itm |
| 165 | + |
| 166 | +- `resources` team |
| 167 | + - Repos: [`discovery`], [`book`], [`embedonomicon`], [`awesome-embedded-rust`], [`f3`], |
| 168 | + [`newsletters`]. |
| 169 | + - Members: @andre-richter, @jamesmunns, @therealprof, @japaric |
| 170 | + |
| 171 | +[`discovery`]: https://github.com./japaric/discovery |
| 172 | +[`book`]: https://book.rust-embedded.org/ |
| 173 | +[`embedonomicon`]: https://embedonomicon.rust-embedded.org/ |
| 174 | +[`awesome-embedded-rust`]: https://github.com./rust-embedded/awesome-embedded-rust |
| 175 | +[`f3`]: https://github.com./japaric/f3 |
| 176 | +[`newsletters`]: https://github.com./rust-lang-nursery/embedded-wg/tree/master/newsletters |
| 177 | + |
| 178 | +- `cortex-m` team |
| 179 | + - Crates: [`cortex-m`], [`cortex-m-rt`], [`cortex-m-quickstart`], [`cortex-m-semihosting`], |
| 180 | + [`alloc-cortex-m`], [`itm`], [`panic-semihosting`], [`panic-itm`] |
| 181 | + - Members: @hannobraun, @thejpster, @japaric |
| 182 | + |
| 183 | +[`cortex-m`]: https://github.com./japaric/cortex-m |
| 184 | +[`cortex-m-rt`]: https://github.com./japaric/cortex-m-rt |
| 185 | +[`cortex-m-quickstart`]: https://github.com./japaric/cortex-m-quickstart |
| 186 | +[`cortex-m-semihosting`]: https://github.com./japaric/cortex-m-semihosting |
| 187 | +[`alloc-cortex-m`]: https://github.com./japaric/alloc-cortex-m |
| 188 | +[`panic-semihosting`]: https://github.com./japaric/panic-semihosting |
| 189 | +[`panic-itm`]: https://github.com./japaric/panic-itm |
| 190 | + |
| 191 | +- `riscv` team |
| 192 | + - Crates: [`riscv`], [`riscv-rt`], [`riscv-quickstart`] |
| 193 | + - Members: @dvc94ch |
| 194 | + |
| 195 | +[`riscv`]: https://github.com./riscv-rust/riscv |
| 196 | +[`riscv-rt`]: https://github.com./riscv-rust/riscv-rt |
| 197 | +[`riscv-quickstart`]: https://github.com./riscv-rust/riscv-rust-quickstart |
| 198 | + |
| 199 | +- `msp430` team |
| 200 | + - Crates: [`msp430`], [`msp430-rt`], [`msp430-quickstart`] |
| 201 | + - Members: @pftbest, @cr1901 |
| 202 | + |
| 203 | +[`msp430`]: https://github.com./pftbest/msp430 |
| 204 | +[`msp430-rt`]: https://github.com./pftbest/msp430-rt |
| 205 | +[`msp430-quickstart`]: https://github.com./japaric/msp430-quickstart |
| 206 | + |
| 207 | +- `triage` team |
| 208 | + - Crates: read/write access to all repositories. |
| 209 | + - Members: TBD |
| 210 | + |
| 211 | +Note that this is the *proposed* organization. Invitations will be sent to the people listed here |
| 212 | +but they are free to decline the invitation. |
| 213 | + |
| 214 | +Name and other changes: |
| 215 | + |
| 216 | +- `rust-lang-nursery/embedded-wg` -> `rust-embedded/wg` |
| 217 | +- The embedded Rust book and the embedonomicon which currently live in `rust-embedded/wg` will be |
| 218 | + moved into their own repositories. |
| 219 | +- The newletters in `rust-embedded/wg` will also be moved into their own repository. |
| 220 | +- The logo of the rust-embedded logo will change to the embedded WG logo. |
| 221 | +- All members of the rust-embedded org will be able to manage issues and PRs in the rust-embedded/wg |
| 222 | + repository. |
| 223 | + |
| 224 | +# Alternatives |
| 225 | + |
| 226 | +An alternative to this proposal is to have the architectures teams be their own independent orgs. |
| 227 | + |
| 228 | +# Unresolved questions |
| 229 | + |
| 230 | +> Where is the AVR team? |
| 231 | +
|
| 232 | +Only architectures with built-in support, or that will soon have built-in support, in `rustc` have |
| 233 | +been considered in this proposal. We can spin up more teams in the future. |
| 234 | + |
| 235 | +- The procedure for having a team member retire is still TBD. |
| 236 | + |
| 237 | +- The procedure for removing (deprecating?) a crate from the rust-embedded org is still TBD. |
| 238 | + |
| 239 | +- The procedure for creating a brand new team is still TBD. |
0 commit comments