Update CONTRIBUTING.md for crate creation. (#29637)
Create a section under CONTRIBUTING.md for crate creation.
This commit is contained in:
parent
a5213d41f3
commit
c96b52eda4
|
@ -208,6 +208,41 @@ of the direction" suddenly has the appearance of "I approve of these changes."
|
|||
Instead, add a comment that mentions the usernames that you would like a review
|
||||
from. Ask explicitly what you would like feedback on.
|
||||
|
||||
## Crate Creation
|
||||
|
||||
If your PR includes a new crate, you must publish its v0.0.1 version
|
||||
before the PR can be merged. Here are the steps:
|
||||
|
||||
* Create a sub-directory for your new crate.
|
||||
* Under the newly-created directory, create a Cargo.toml file. Below is an
|
||||
example template:
|
||||
|
||||
```
|
||||
[package]
|
||||
name = "solana-<PACKAGE_NAME>"
|
||||
version = "0.0.1"
|
||||
description = "<DESCRIPTION>"
|
||||
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
homepage = "https://solana.com/"
|
||||
documentation = "https://docs.rs/solana-<PACKAGE_NAME>"
|
||||
license = "Apache-2.0"
|
||||
edition = "2021"
|
||||
```
|
||||
|
||||
* Submit the PR for initial review. You should see the crate-check CI
|
||||
job fails because the newly created crate is not yet published.
|
||||
|
||||
* Once all review feedback has been addressed, publish v0.0.1 of the crate
|
||||
under your personal crates.io account, and then transfer the crate ownership
|
||||
to solana-grimes.
|
||||
https://crates.io/policies#package-ownership
|
||||
|
||||
* After successful publication, update the PR by replacing the v0.0.1 version
|
||||
number with the correct version. At this time you should see the crate-check
|
||||
CI job passes, and your published crate should be available under
|
||||
https://crates.io/crates/.
|
||||
|
||||
## Rust coding conventions
|
||||
|
||||
* All Rust code is formatted using the latest version of `rustfmt`. Once
|
||||
|
@ -258,4 +293,4 @@ Current design proposals may be viewed on the docs site:
|
|||
1. [Accepted Proposals](https://docs.solana.com/proposals/accepted-design-proposals)
|
||||
2. [Implemented Proposals](https://docs.solana.com/implemented-proposals/implemented-proposals)
|
||||
|
||||
New design proposals should follow this guide on [how to submit a design proposal](./docs/src/proposals.md#submit-a-design-proposal).
|
||||
New design proposals should follow this guide on [how to submit a design proposal](./docs/src/proposals.md#submit-a-design-proposal).
|
||||
|
|
Loading…
Reference in New Issue