From 43d15b05c2b97cab30103fa2b46cff26e91619ec Mon Sep 17 00:00:00 2001 From: Not-Nik Date: Sat, 8 Jun 2024 12:42:09 +0200 Subject: [PATCH] Add CONTRIBUTING.md --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..789b3ad --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,35 @@ +# Contributing to raylib-zig + +Thank you for your interest in contributing to raylib-zig. There are some guidelines you will need to follow in order +to get your contribution added to the project as fast as possible. + +## Updates to the Zig version + +This binding will never target any Zig version newer than the latest release. Fixes that don't affect compatibility +with the latest release and allow the binding to be used on a pre-release/HEAD version of Zig may be accepted. + +## Updates to the raylib version + +Usually this binding will stay on the latest release commit for raylib, but occasionally upgrade to a HEAD version when +there are changes made, critical to the Zig build. In those cases there will be a release tag on GitHub, marking the +latest commit that uses a raylib release. Previously there were extra branches for older versions of raylib, but this +approach was abandoned. + +## Updates to the binding files + +raylib-zig is built mostly through the `generate_functions.py` script. It creates the definitions to access the raw C +functions, and creates aliases with proper Zig argument and return types, Zig style names and errors. The raylib types, +however, are created manually and should only be updated in their respective preludes: + - `lib/preludes/raylib-prelude.zig` for raylib types + - `lib/preludes/raymath-prelude.zig` for raymath types + - `lib/preludes/rlgl-prelude.zig` for rlgl types + - `lib/preludes/raygui-prelude.zig` for raygui types + +Before any commit you make, you should always run `generate_functions.py` to ensure your changes are persistent +throughout other updates. + +## Updates to the build files + +Updates to raylib-zig's `build.zig`, as any other contributions to binding files, are very welcome. However, when +updating public names or APIs, you should always ensure that the project template in `project_setup.sh` still +works with them.