From ca02faa1321893a117107b4de0ad11bd57702fcb Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 24 Dec 2025 17:35:10 +0300 Subject: [PATCH 1/2] =?UTF-8?q?deps:=20update=20goffi=20v0.3.1=20=E2=86=92?= =?UTF-8?q?=20v0.3.3,=20x/sys=20v0.38.0=20=E2=86=92=20v0.39.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - goffi: PointerType hotfix (issue #4) - x/sys: latest version --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 489a239..9dfbf2c 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module github.com/go-webgpu/webgpu go 1.25 -require github.com/go-webgpu/goffi v0.3.1 +require github.com/go-webgpu/goffi v0.3.3 -require golang.org/x/sys v0.38.0 +require golang.org/x/sys v0.39.0 diff --git a/go.sum b/go.sum index 52b8226..7eb02ad 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/go-webgpu/goffi v0.3.1 h1:q1a7eG5gvMNbTOY8/YNGcBxyn5iVvtl9N8ifqJXiZRk= -github.com/go-webgpu/goffi v0.3.1/go.mod h1:wfoxNsJkU+5RFbV1kNN1kunhc1lFHuJKK3zpgx08/uM= -golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= -golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +github.com/go-webgpu/goffi v0.3.3 h1:sK4nmMYZG6zLTMtSXD8rXlz0PnqZU4y4u0bqmZVEADk= +github.com/go-webgpu/goffi v0.3.3/go.mod h1:wfoxNsJkU+5RFbV1kNN1kunhc1lFHuJKK3zpgx08/uM= +golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= +golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= From 6ccd063686cf448bdb9691191cb1fe4fc479259c Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 24 Dec 2025 17:41:01 +0300 Subject: [PATCH 2/2] docs: update CHANGELOG for v0.1.1, PR workflow in CONTRIBUTING --- CHANGELOG.md | 21 +++++++++- CONTRIBUTING.md | 101 +++++++++++++++++++++--------------------------- ROADMAP.md | 19 ++++----- 3 files changed, 73 insertions(+), 68 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea72d03..c63ec9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.1] - 2024-12-24 + +### Changed + +- **goffi:** v0.3.1 → v0.3.3 (PointerType argument passing hotfix) +- **golang.org/x/sys:** v0.38.0 → v0.39.0 + +### Fixed + +- Critical bug in PointerType argument passing ([goffi#4](https://github.com/go-webgpu/goffi/issues/4)) + +### Infrastructure + +- Branch protection enabled for `main` +- All changes now require Pull Requests +- Updated CONTRIBUTING.md with PR workflow + +--- + ## [0.1.0] - 2024-11-28 ### Added @@ -70,4 +89,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Dependencies - github.com/go-webgpu/goffi v0.3.1 -- wgpu-native v24.0.0.2 +- wgpu-native v24.0.3.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d08ae3d..df5bfc6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,96 +2,79 @@ Thank you for considering contributing to go-webgpu! This document outlines the development workflow and guidelines. -## Git Workflow (Git-Flow) +## Git Workflow (Pull Request) -This project uses Git-Flow branching model for development. +All changes to `main` branch **must** go through Pull Requests. The `main` branch is protected. ### Branch Structure ``` -main # Production-ready code (tagged releases) - └─ develop # Integration branch for next release - ├─ feature/* # New features - ├─ bugfix/* # Bug fixes - └─ hotfix/* # Critical fixes from main +main # Protected. Production-ready code (tagged releases) + ├─ feat/* # New features + ├─ fix/* # Bug fixes + ├─ deps/* # Dependency updates + ├─ docs/* # Documentation + └─ hotfix/* # Critical fixes ``` -### Branch Purposes +### Branch Protection -- **main**: Production-ready code. Only releases are merged here. -- **develop**: Active development branch. All features merge here first. -- **feature/\***: New features. Branch from `develop`, merge back to `develop`. -- **bugfix/\***: Bug fixes. Branch from `develop`, merge back to `develop`. -- **hotfix/\***: Critical production fixes. Branch from `main`, merge to both `main` and `develop`. +- **main** is protected — no direct pushes allowed +- All changes require a Pull Request +- Admins can bypass protection for emergency fixes ### Workflow Commands #### Starting a New Feature ```bash -# Create feature branch from develop -git checkout develop -git pull origin develop -git checkout -b feature/my-new-feature +# Create feature branch from main +git checkout main +git pull origin main +git checkout -b feat/my-new-feature # Work on your feature... git add . git commit -m "feat: add my new feature" -# When done, merge back to develop -git checkout develop -git merge --squash feature/my-new-feature -git commit -m "feat: my new feature" -git branch -d feature/my-new-feature -git push origin develop +# Push branch and create PR +git push -u origin feat/my-new-feature +gh pr create --title "feat: add my new feature" --body "Description..." + +# After PR is merged, clean up +git checkout main +git pull origin main +git branch -d feat/my-new-feature ``` #### Fixing a Bug ```bash -# Create bugfix branch from develop -git checkout develop -git pull origin develop -git checkout -b bugfix/fix-issue-123 +# Create fix branch from main +git checkout main +git pull origin main +git checkout -b fix/issue-123 # Fix the bug... git add . git commit -m "fix: resolve issue #123" -# Merge back to develop -git checkout develop -git merge --squash bugfix/fix-issue-123 -git commit -m "fix: resolve issue #123" -git branch -d bugfix/fix-issue-123 -git push origin develop +# Push and create PR +git push -u origin fix/issue-123 +gh pr create --title "fix: resolve issue #123" --body "Closes #123" ``` #### Creating a Release ```bash -# Create release branch from develop -git checkout develop -git pull origin develop -git checkout -b release/v0.2.0 - -# Update version numbers, CHANGELOG, etc. -git add . -git commit -m "chore: prepare release v0.2.0" - -# Merge to main and tag +# After PR is merged, create release from main git checkout main -git merge --no-ff release/v0.2.0 -git tag -a v0.2.0 -m "Release v0.2.0" +git pull origin main -# Merge back to develop -git checkout develop -git merge --no-ff release/v0.2.0 - -# Delete release branch -git branch -d release/v0.2.0 - -# Push everything -git push origin main develop --tags +# Create tag and release +git tag -a v0.2.0 -m "Release v0.2.0" +git push origin v0.2.0 +gh release create v0.2.0 --title "v0.2.0" --notes "Release notes..." ``` ## Commit Message Guidelines @@ -111,10 +94,11 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/) specificatio - **feat**: New feature - **fix**: Bug fix - **docs**: Documentation changes +- **deps**: Dependency updates - **style**: Code style changes (formatting, etc.) - **refactor**: Code refactoring - **test**: Adding or updating tests -- **chore**: Maintenance tasks (build, dependencies, etc.) +- **chore**: Maintenance tasks (build, CI, etc.) - **perf**: Performance improvements ### Examples @@ -123,9 +107,10 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/) specificatio feat: add Texture3D support fix: correct buffer mapping alignment docs: update README with compute shader example +deps: update goffi v0.3.1 → v0.3.3 refactor: simplify device creation flow test: add render pipeline tests -chore: update wgpu-native to v24.0.1 +chore: update CI workflow perf: optimize command encoder batch submission ``` @@ -168,7 +153,7 @@ perf: optimize command encoder batch submission ### Prerequisites -- Go 1.21 or later +- Go 1.25 or later - golangci-lint v2 - wgpu-native shared libraries (download script provided) @@ -342,7 +327,7 @@ type CStruct struct { ### macOS - Uses goffi for pure-Go FFI (CGO_ENABLED=0) -- Currently x86_64 only (goffi ARM64 support pending) +- Supports both x86_64 and ARM64 (Apple Silicon) - Surface requires Metal layer ## Getting Help diff --git a/ROADMAP.md b/ROADMAP.md index 0988f79..05e47b4 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,7 +2,7 @@ > **Strategic Focus**: Production-grade Zero-CGO WebGPU bindings for Go -**Last Updated**: 2024-11-28 | **Current Version**: v0.1.0 | **Target**: v1.0.0 stable +**Last Updated**: 2024-12-24 | **Current Version**: v0.1.1 | **Target**: v1.0.0 stable --- @@ -12,12 +12,12 @@ Build **production-ready, cross-platform WebGPU bindings** for Go with zero CGO ### Current State vs Target -| Metric | Current (v0.1.0) | Target (v1.0.0) | +| Metric | Current (v0.1.1) | Target (v1.0.0) | |--------|------------------|-----------------| | Platforms | Windows, Linux, macOS (x64, arm64) | All major platforms | | CGO Required | No (Zero-CGO) | No | | API Coverage | ~80% WebGPU | 100% WebGPU | -| wgpu-native | v24.0.0.2 | Latest stable | +| wgpu-native | v24.0.3.1 | Latest stable | | Test Coverage | ~70% | 90%+ | | Examples | 11 | 20+ | @@ -26,7 +26,7 @@ Build **production-ready, cross-platform WebGPU bindings** for Go with zero CGO ## Release Strategy ``` -v0.1.0 (Current) -> Initial release with core features + ARM64 +v0.1.1 (Current) -> Hotfix: goffi PointerType bug + PR workflow | v0.2.0 (Next) -> API improvements, builder patterns | @@ -157,7 +157,7 @@ v1.0.0 STABLE -> Production release with API stability guarantee --- -## Current Examples (v0.1.0) +## Current Examples (v0.1.x) | Example | Features Demonstrated | |---------|----------------------| @@ -179,9 +179,9 @@ v1.0.0 STABLE -> Production release with API stability guarantee | Dependency | Version | Purpose | |------------|---------|---------| -| wgpu-native | v24.0.0.2 | WebGPU implementation | -| goffi | v0.3.1 | Pure-Go FFI (x64 + ARM64) | -| Go | 1.21+ | Language runtime | +| wgpu-native | v24.0.3.1 | WebGPU implementation | +| goffi | v0.3.3 | Pure-Go FFI (x64 + ARM64) | +| Go | 1.25+ | Language runtime | ### Upstream Tracking @@ -215,8 +215,9 @@ Priority features are marked in GitHub Issues with labels: | Version | Date | Type | Key Changes | |---------|------|------|-------------| +| v0.1.1 | 2024-12-24 | Hotfix | goffi v0.3.3 (PointerType fix), PR workflow | | v0.1.0 | 2024-11-28 | Initial | Core API, 11 examples, 5 platforms (x64 + ARM64) | --- -*Current: v0.1.0 | Next: v0.2.0 (API Improvements) | Target: v1.0.0 (Q4 2025)* +*Current: v0.1.1 | Next: v0.2.0 (API Improvements) | Target: v1.0.0 (Q4 2025)*