🚀 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-sdkgenerator: the code generator, used to generate a part ofcdevents-sdkfromcdevents-specs
Few design's rules:
- The generated code is commited, so users of
cdevents-sdkdon'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:
mise install: to install complementary tools, sdk,...mise tasks: to list all tasks used to build
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-rustrepository 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
gitremote repositoriesAdding
cdevents/sdk-rustas theupstreamand your fork as theoriginremote repositories to your.git/configsets 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
upstreamrepositorygit 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
originrepositorygit remote add origin [email protected]:${YOUR_GITHUB_USERNAME}/sdk-rust.git
-
git switch -c feat_fooTo format the rust code and imports:
mise run fmtTo run the all the tasks like the ci:
mise run ciTo run unit tests:
mise run testCommit's message should follow the conventional commit convention: e.g.
feat: my super feature
...fix: bug blablabla
FIX #99Create 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.