diff --git a/internal/ext/wasm/nowasm.go b/internal/ext/wasm/nowasm.go index e32100fcad..cd2a75ae84 100644 --- a/internal/ext/wasm/nowasm.go +++ b/internal/ext/wasm/nowasm.go @@ -1,16 +1,19 @@ -//go:build !(cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64))) +//go:build nowasm || !(cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64))) package wasm import ( "fmt" + "context" "github.com/kyleconroy/sqlc/internal/plugin" ) type Runner struct { + URL string + SHA256 string } -func (r *Runner) Generate(req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { +func (r *Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) { return nil, fmt.Errorf("sqlc built without wasmtime support") } diff --git a/internal/ext/wasm/wasm.go b/internal/ext/wasm/wasm.go index a55d8551d1..6219d06a2b 100644 --- a/internal/ext/wasm/wasm.go +++ b/internal/ext/wasm/wasm.go @@ -1,4 +1,4 @@ -//go:build cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) +//go:build !nowasm && cgo && ((linux && amd64) || (linux && arm64) || (darwin && amd64) || (darwin && arm64) || (windows && amd64)) // The above build constraint is based of the cgo directives in this file: // https://github.com/bytecodealliance/wasmtime-go/blob/main/ffi.go