Skip to content

Commit f87a190

Browse files
committed
Initial commit
0 parents  commit f87a190

File tree

25 files changed

+15620
-0
lines changed

25 files changed

+15620
-0
lines changed

cmd/sqlc-gen-hello/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
sqlc-gen-hello.wasm: main.go
2+
tinygo build -o sqlc-gen-hello.wasm -gc=leaking -scheduler=none -wasm-abi=generic -target=wasi main.go
3+
openssl sha256 sqlc-gen-hello.wasm

cmd/sqlc-gen-hello/main.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package main
2+
3+
import (
4+
"context"
5+
6+
"github.com/tabbed/sqlc-go/codegen"
7+
)
8+
9+
func main() {
10+
codegen.Run(generate)
11+
}
12+
13+
func generate(ctx context.Context, req *codegen.Request) (*codegen.Response, error) {
14+
resp := &codegen.Response{
15+
Files: []*codegen.File{
16+
{
17+
Name: "output.txt",
18+
Contents: []byte("hello"),
19+
},
20+
},
21+
}
22+
return resp, nil
23+
}

cmd/sqlc-gen-python/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
sqlc-gen-python:
2+
cd cmd/sqlc-gen-python && go build -o ~/bin/sqlc-gen-python ./main.go
3+
4+
sqlc-gen-python.wasm:
5+
cd cmd/sqlc-gen-python
6+
tinygo build -o sqlc-gen-python.wasm -gc=leaking -scheduler=none -wasm-abi=generic -target=wasi main.go
7+
openssl sha256 sqlc-gen-python.wasm
8+

0 commit comments

Comments
 (0)