Thank you for your interest in contributing to gpucontext!
This package must have zero external dependencies. This is a hard requirement, not a preference.
Why:
- Foundation packages cannot create circular dependencies
- Maximum compatibility across Go versions
- Minimal binary size impact
When proposing new interfaces:
- Minimal — Include only essential methods
- Orthogonal — Interfaces should be composable
- Stable — Changes break downstream packages
Example of good interface:
type Device interface {
Poll(wait bool)
Destroy()
}Example of bad interface (too specific):
type Device interface {
CreateBuffer(size int, usage BufferUsage) Buffer
CreateTexture(desc TextureDescriptor) Texture
CreateShaderModule(code string) ShaderModule
// ... 50 more methods
}- Follow standard Go conventions
- Run
go fmtbefore committing - Run
golangci-lint runfor linting - Add tests for new functionality
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make changes with tests
- Run:
go test ./... && golangci-lint run - Submit PR with clear description
Follow Conventional Commits:
feat: add Capabilities interface
fix: correct TextureFormat values
docs: update README examples
test: add Registry edge cases
Open a Discussion on GitHub.