🚀 Thank you for contributing to cdevents! 🚀
The workspace is composed of:
cdevents-sdk
: the published rust cratecdevents-specs
: the different version of cdevent's specifications used to generate and validate part ofcdevents-sdk
generator
: the code generator, used to generate a part ofcdevents-sdk
fromcdevents-specs
Few design's rules:
- The generated code is commited, so users of
cdevents-sdk
don't to generate it at each build. - TO COMPLETE
GitHub is used for project Source Code Management (SCM) using the SSH protocol for authentication.
- Create a GitHub account if you do not already have one.
- Setup GitHub access via SSH
You must install these tools:
-
git
: For source control -
If you use mise:
mise install
(after git clone) Else look into the mise configuration file.mise.toml
to have the list of tools to install
The sdk-rust project requires that you develop (commit) code changes to branches that belong to a fork of the cdevents/sdk-rust
repository in your GitHub account before submitting them as Pull Requests (PRs) to the actual project repository.
-
Create a fork of the
cdevents/sdk-rust
repository in your GitHub account. -
Create a clone of your fork on your local machine:
git clone [email protected]:${YOUR_GITHUB_USERNAME}/sdk-rust.git
-
Configure
git
remote repositoriesAdding
cdevents/sdk-rust
as theupstream
and your fork as theorigin
remote repositories to your.git/config
sets you up nicely for regularly syncing your fork and submitting pull requests.-
Change into the project directory
cd sdk-rust
-
Retrieve submodules
git submodule init git submodule update --init --recursive
-
Configure sdk-rust as the
upstream
repositorygit remote add upstream [email protected]:cdevents/sdk-rust.git # Optional: Prevent accidental pushing of commits by changing the upstream URL to `no_push` git remote set-url --push upstream no_push
-
Configure your fork as the
origin
repositorygit remote add origin [email protected]:${YOUR_GITHUB_USERNAME}/sdk-rust.git
-
git switch -c feat_foo
To format the rust code and imports:
make fmt
To run the go linter:
make lint
To run unit tests:
make test
Commit's message should follow the conventional commit convention: e.g.
feat: my super feature
...
fix: bug blablabla
FIX #99
Create a PR (pull request) and ask for review. The last reviewer, will "Squash & merge" when ready. The message of the squashed commit follows the conventional commit, and aggregate/summaries commits of the branch.