Thank you for your interest in contributing to galloc! This document provides guidelines for contributing to this project.
- Go 1.25+ -- matches gogpu ecosystem requirements
- golangci-lint --
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
go build ./...# Unit tests
go test ./...
# With race detector (requires CGO_ENABLED=1)
CGO_ENABLED=1 go test -race ./...
# With coverage
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.outgo test -bench=. -benchmem ./...go test -fuzz=FuzzAllocFree -fuzztime=30s- Format with
gofmt(enforced in CI) - Pass
golangci-lint run --timeout=5m - Pass
go vet ./... - Add comments for non-obvious logic -- explain WHY, not WHAT
- All public types and functions must have doc comments
- No
unsafe-- this library is intentionally pure safe Go
- Fork the repository and create a feature branch
- Use Conventional Commits for commit messages:
feat:new featuresfix:bug fixesperf:performance improvementstest:test additions/changesdocs:documentationrefactor:code restructuring
- Ensure all checks pass:
go build ./... && go test ./... && golangci-lint run --timeout=5m - Open a PR against
main
AI-assisted contributions are welcome. For guidance on effective AI-assisted development practices, see the Smart Coding section in the wgpu CONTRIBUTING.md.
By contributing, you agree that your contributions will be licensed under the MIT License.