Thank you for your interest in contributing to WinKernelLite! This guide covers the essentials for getting started.
- Windows OS
- CMake 3.29+
- Visual Studio 2019+ or VS Code
- Git
- Fork and clone the repository
- Build the project:
mkdir build && cd build cmake .. cmake --build . - Run tests:
.\build\bin\runTests.exe
- Use clear, descriptive titles
- Include steps to reproduce
- Provide system information (OS, compiler, version)
- Add screenshots or code snippets if helpful
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request with a clear description
- Use PascalCase for functions:
InitializeListHead() - Use meaningful variable names
- 4 spaces for indentation
- 80-100 character line limit
- Add parameter annotations (
_In_,_Out_, etc.)
NTSTATUS
RtlCopyUnicodeString(
_Inout_ PUNICODE_STRING DestinationString,
_In_opt_ PCUNICODE_STRING SourceString
)
{
if (DestinationString == NULL) {
return STATUS_INVALID_PARAMETER;
}
// Implementation here
return STATUS_SUCCESS;
}- Use include guards
- Order includes: standard → Windows → project headers
- Use
extern "C"for C++ compatibility - Document public functions
- Add unit tests for all new features
- Use Google Test framework
- Follow the existing test patterns
TEST(UnicodeStringTest, InitializeString) {
UNICODE_STRING str;
RtlInitUnicodeString(&str, L"Test");
EXPECT_EQ(8, str.Length);
EXPECT_NE(nullptr, str.Buffer);
}# All tests
.\build\bin\runTests.exe
# Specific tests
.\build\bin\runTests.exe --gtest_filter="*Unicode*"- Document all public functions
- Use clear, concise descriptions
- Include parameter and return value information
/**
* @brief Allocates memory from the specified pool.
* @param PoolType Type of pool to allocate from
* @param NumberOfBytes Size in bytes
* @return Pointer to allocated memory, or NULL if failed
*/
PVOID ExAllocatePool(POOL_TYPE PoolType, SIZE_T NumberOfBytes);feature/feature-name- New featuresbugfix/issue-description- Bug fixesdocs/update-description- Documentation updates
- Keep first line under 50 characters
- Use clear, descriptive language
- Reference issue numbers when applicable
Example:
Add memory allocation tracking
Implements tracked allocation to help debug memory leaks.
Fixes #42
- Create an issue for questions
- Check existing issues and documentation first
- Be specific about your problem or question
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.
Happy coding! 🚀