Skip to content

Commit 47393d7

Browse files
authored
v0.1.1: goffi hotfix + PR workflow (#1)
* deps: update goffi v0.3.1 → v0.3.3, x/sys v0.38.0 → v0.39.0 - goffi: PointerType hotfix (issue #4) - x/sys: latest version * docs: update CHANGELOG for v0.1.1, PR workflow in CONTRIBUTING
1 parent 3c2ace3 commit 47393d7

File tree

5 files changed

+79
-74
lines changed

5 files changed

+79
-74
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.1] - 2024-12-24
9+
10+
### Changed
11+
12+
- **goffi:** v0.3.1 → v0.3.3 (PointerType argument passing hotfix)
13+
- **golang.org/x/sys:** v0.38.0 → v0.39.0
14+
15+
### Fixed
16+
17+
- Critical bug in PointerType argument passing ([goffi#4](https://github.com/go-webgpu/goffi/issues/4))
18+
19+
### Infrastructure
20+
21+
- Branch protection enabled for `main`
22+
- All changes now require Pull Requests
23+
- Updated CONTRIBUTING.md with PR workflow
24+
25+
---
26+
827
## [0.1.0] - 2024-11-28
928

1029
### Added
@@ -70,4 +89,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7089

7190
### Dependencies
7291
- github.com/go-webgpu/goffi v0.3.1
73-
- wgpu-native v24.0.0.2
92+
- wgpu-native v24.0.3.1

CONTRIBUTING.md

Lines changed: 43 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,96 +2,79 @@
22

33
Thank you for considering contributing to go-webgpu! This document outlines the development workflow and guidelines.
44

5-
## Git Workflow (Git-Flow)
5+
## Git Workflow (Pull Request)
66

7-
This project uses Git-Flow branching model for development.
7+
All changes to `main` branch **must** go through Pull Requests. The `main` branch is protected.
88

99
### Branch Structure
1010

1111
```
12-
main # Production-ready code (tagged releases)
13-
└─ develop # Integration branch for next release
14-
├─ feature/* # New features
15-
├─ bugfix/* # Bug fixes
16-
└─ hotfix/* # Critical fixes from main
12+
main # Protected. Production-ready code (tagged releases)
13+
├─ feat/* # New features
14+
├─ fix/* # Bug fixes
15+
├─ deps/* # Dependency updates
16+
├─ docs/* # Documentation
17+
└─ hotfix/* # Critical fixes
1718
```
1819

19-
### Branch Purposes
20+
### Branch Protection
2021

21-
- **main**: Production-ready code. Only releases are merged here.
22-
- **develop**: Active development branch. All features merge here first.
23-
- **feature/\***: New features. Branch from `develop`, merge back to `develop`.
24-
- **bugfix/\***: Bug fixes. Branch from `develop`, merge back to `develop`.
25-
- **hotfix/\***: Critical production fixes. Branch from `main`, merge to both `main` and `develop`.
22+
- **main** is protected — no direct pushes allowed
23+
- All changes require a Pull Request
24+
- Admins can bypass protection for emergency fixes
2625

2726
### Workflow Commands
2827

2928
#### Starting a New Feature
3029

3130
```bash
32-
# Create feature branch from develop
33-
git checkout develop
34-
git pull origin develop
35-
git checkout -b feature/my-new-feature
31+
# Create feature branch from main
32+
git checkout main
33+
git pull origin main
34+
git checkout -b feat/my-new-feature
3635

3736
# Work on your feature...
3837
git add .
3938
git commit -m "feat: add my new feature"
4039

41-
# When done, merge back to develop
42-
git checkout develop
43-
git merge --squash feature/my-new-feature
44-
git commit -m "feat: my new feature"
45-
git branch -d feature/my-new-feature
46-
git push origin develop
40+
# Push branch and create PR
41+
git push -u origin feat/my-new-feature
42+
gh pr create --title "feat: add my new feature" --body "Description..."
43+
44+
# After PR is merged, clean up
45+
git checkout main
46+
git pull origin main
47+
git branch -d feat/my-new-feature
4748
```
4849

4950
#### Fixing a Bug
5051

5152
```bash
52-
# Create bugfix branch from develop
53-
git checkout develop
54-
git pull origin develop
55-
git checkout -b bugfix/fix-issue-123
53+
# Create fix branch from main
54+
git checkout main
55+
git pull origin main
56+
git checkout -b fix/issue-123
5657

5758
# Fix the bug...
5859
git add .
5960
git commit -m "fix: resolve issue #123"
6061

61-
# Merge back to develop
62-
git checkout develop
63-
git merge --squash bugfix/fix-issue-123
64-
git commit -m "fix: resolve issue #123"
65-
git branch -d bugfix/fix-issue-123
66-
git push origin develop
62+
# Push and create PR
63+
git push -u origin fix/issue-123
64+
gh pr create --title "fix: resolve issue #123" --body "Closes #123"
6765
```
6866

6967
#### Creating a Release
7068

7169
```bash
72-
# Create release branch from develop
73-
git checkout develop
74-
git pull origin develop
75-
git checkout -b release/v0.2.0
76-
77-
# Update version numbers, CHANGELOG, etc.
78-
git add .
79-
git commit -m "chore: prepare release v0.2.0"
80-
81-
# Merge to main and tag
70+
# After PR is merged, create release from main
8271
git checkout main
83-
git merge --no-ff release/v0.2.0
84-
git tag -a v0.2.0 -m "Release v0.2.0"
72+
git pull origin main
8573

86-
# Merge back to develop
87-
git checkout develop
88-
git merge --no-ff release/v0.2.0
89-
90-
# Delete release branch
91-
git branch -d release/v0.2.0
92-
93-
# Push everything
94-
git push origin main develop --tags
74+
# Create tag and release
75+
git tag -a v0.2.0 -m "Release v0.2.0"
76+
git push origin v0.2.0
77+
gh release create v0.2.0 --title "v0.2.0" --notes "Release notes..."
9578
```
9679

9780
## Commit Message Guidelines
@@ -111,10 +94,11 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/) specificatio
11194
- **feat**: New feature
11295
- **fix**: Bug fix
11396
- **docs**: Documentation changes
97+
- **deps**: Dependency updates
11498
- **style**: Code style changes (formatting, etc.)
11599
- **refactor**: Code refactoring
116100
- **test**: Adding or updating tests
117-
- **chore**: Maintenance tasks (build, dependencies, etc.)
101+
- **chore**: Maintenance tasks (build, CI, etc.)
118102
- **perf**: Performance improvements
119103

120104
### Examples
@@ -123,9 +107,10 @@ Follow [Conventional Commits](https://www.conventionalcommits.org/) specificatio
123107
feat: add Texture3D support
124108
fix: correct buffer mapping alignment
125109
docs: update README with compute shader example
110+
deps: update goffi v0.3.1 → v0.3.3
126111
refactor: simplify device creation flow
127112
test: add render pipeline tests
128-
chore: update wgpu-native to v24.0.1
113+
chore: update CI workflow
129114
perf: optimize command encoder batch submission
130115
```
131116

@@ -168,7 +153,7 @@ perf: optimize command encoder batch submission
168153

169154
### Prerequisites
170155

171-
- Go 1.21 or later
156+
- Go 1.25 or later
172157
- golangci-lint v2
173158
- wgpu-native shared libraries (download script provided)
174159

@@ -342,7 +327,7 @@ type CStruct struct {
342327

343328
### macOS
344329
- Uses goffi for pure-Go FFI (CGO_ENABLED=0)
345-
- Currently x86_64 only (goffi ARM64 support pending)
330+
- Supports both x86_64 and ARM64 (Apple Silicon)
346331
- Surface requires Metal layer
347332

348333
## Getting Help

ROADMAP.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> **Strategic Focus**: Production-grade Zero-CGO WebGPU bindings for Go
44
5-
**Last Updated**: 2024-11-28 | **Current Version**: v0.1.0 | **Target**: v1.0.0 stable
5+
**Last Updated**: 2024-12-24 | **Current Version**: v0.1.1 | **Target**: v1.0.0 stable
66

77
---
88

@@ -12,12 +12,12 @@ Build **production-ready, cross-platform WebGPU bindings** for Go with zero CGO
1212

1313
### Current State vs Target
1414

15-
| Metric | Current (v0.1.0) | Target (v1.0.0) |
15+
| Metric | Current (v0.1.1) | Target (v1.0.0) |
1616
|--------|------------------|-----------------|
1717
| Platforms | Windows, Linux, macOS (x64, arm64) | All major platforms |
1818
| CGO Required | No (Zero-CGO) | No |
1919
| API Coverage | ~80% WebGPU | 100% WebGPU |
20-
| wgpu-native | v24.0.0.2 | Latest stable |
20+
| wgpu-native | v24.0.3.1 | Latest stable |
2121
| Test Coverage | ~70% | 90%+ |
2222
| Examples | 11 | 20+ |
2323

@@ -26,7 +26,7 @@ Build **production-ready, cross-platform WebGPU bindings** for Go with zero CGO
2626
## Release Strategy
2727

2828
```
29-
v0.1.0 (Current) -> Initial release with core features + ARM64
29+
v0.1.1 (Current) -> Hotfix: goffi PointerType bug + PR workflow
3030
|
3131
v0.2.0 (Next) -> API improvements, builder patterns
3232
|
@@ -157,7 +157,7 @@ v1.0.0 STABLE -> Production release with API stability guarantee
157157

158158
---
159159

160-
## Current Examples (v0.1.0)
160+
## Current Examples (v0.1.x)
161161

162162
| Example | Features Demonstrated |
163163
|---------|----------------------|
@@ -179,9 +179,9 @@ v1.0.0 STABLE -> Production release with API stability guarantee
179179

180180
| Dependency | Version | Purpose |
181181
|------------|---------|---------|
182-
| wgpu-native | v24.0.0.2 | WebGPU implementation |
183-
| goffi | v0.3.1 | Pure-Go FFI (x64 + ARM64) |
184-
| Go | 1.21+ | Language runtime |
182+
| wgpu-native | v24.0.3.1 | WebGPU implementation |
183+
| goffi | v0.3.3 | Pure-Go FFI (x64 + ARM64) |
184+
| Go | 1.25+ | Language runtime |
185185

186186
### Upstream Tracking
187187

@@ -215,8 +215,9 @@ Priority features are marked in GitHub Issues with labels:
215215

216216
| Version | Date | Type | Key Changes |
217217
|---------|------|------|-------------|
218+
| v0.1.1 | 2024-12-24 | Hotfix | goffi v0.3.3 (PointerType fix), PR workflow |
218219
| v0.1.0 | 2024-11-28 | Initial | Core API, 11 examples, 5 platforms (x64 + ARM64) |
219220

220221
---
221222

222-
*Current: v0.1.0 | Next: v0.2.0 (API Improvements) | Target: v1.0.0 (Q4 2025)*
223+
*Current: v0.1.1 | Next: v0.2.0 (API Improvements) | Target: v1.0.0 (Q4 2025)*

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module github.com/go-webgpu/webgpu
22

33
go 1.25
44

5-
require github.com/go-webgpu/goffi v0.3.1
5+
require github.com/go-webgpu/goffi v0.3.3
66

7-
require golang.org/x/sys v0.38.0
7+
require golang.org/x/sys v0.39.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github.com/go-webgpu/goffi v0.3.1 h1:q1a7eG5gvMNbTOY8/YNGcBxyn5iVvtl9N8ifqJXiZRk=
2-
github.com/go-webgpu/goffi v0.3.1/go.mod h1:wfoxNsJkU+5RFbV1kNN1kunhc1lFHuJKK3zpgx08/uM=
3-
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
4-
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
1+
github.com/go-webgpu/goffi v0.3.3 h1:sK4nmMYZG6zLTMtSXD8rXlz0PnqZU4y4u0bqmZVEADk=
2+
github.com/go-webgpu/goffi v0.3.3/go.mod h1:wfoxNsJkU+5RFbV1kNN1kunhc1lFHuJKK3zpgx08/uM=
3+
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
4+
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=

0 commit comments

Comments
 (0)