Problem
Setting up Maglev on Windows currently requires a complex CGO toolchain (GCC/MinGW) because of the mattn/go-sqlite3 dependency. This creates a high barrier to entry for new contributors on Windows.
Proposed Solution
I propose adding a pure-Go SQLite driver (modernc.org/sqlite) as an alternative using Go build tags.
- Create
driver_cgo.go (with //go:build !windows || cgo tag).
- Create
driver_pure.go (with //go:build windows && !cgo tag).
This ensures that:
- Production/Linux builds remain unaffected (still using CGO).
- Windows developers can run
go run ./cmd/api without any extra setup.
I have already verified this locally and would like to submit a PR if this approach aligns with the project goals.
Problem
Setting up Maglev on Windows currently requires a complex CGO toolchain (GCC/MinGW) because of the
mattn/go-sqlite3dependency. This creates a high barrier to entry for new contributors on Windows.Proposed Solution
I propose adding a pure-Go SQLite driver (
modernc.org/sqlite) as an alternative using Go build tags.driver_cgo.go(with//go:build !windows || cgotag).driver_pure.go(with//go:build windows && !cgotag).This ensures that:
go run ./cmd/apiwithout any extra setup.I have already verified this locally and would like to submit a PR if this approach aligns with the project goals.