1
Fork 0

add some C dependencies

this stresses the toolchain more.
nix
Motiejus Jakštys 2021-07-21 15:02:04 +03:00
parent 631906ffd8
commit 37953e9cd3
5 changed files with 30 additions and 1 deletions

5
go.mod
View File

@ -1,3 +1,8 @@
module github.com/motiejus/bazel-zig-cc/test
go 1.16
require (
github.com/DataDog/zstd v1.4.8
github.com/mattn/go-sqlite3 v1.14.8
)

4
go.sum Normal file
View File

@ -0,0 +1,4 @@
github.com/DataDog/zstd v1.4.8 h1:Rpmta4xZ/MgZnriKNd24iZMhGpP5dvUcs/uqfBapKZY=
github.com/DataDog/zstd v1.4.8/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU=
github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=

View File

@ -1,4 +1,15 @@
load("@bazel_gazelle//:deps.bzl", "go_repository")
def go_repositories():
pass
go_repository(
name = "com_github_datadog_zstd",
importpath = "github.com/DataDog/zstd",
sum = "h1:Rpmta4xZ/MgZnriKNd24iZMhGpP5dvUcs/uqfBapKZY=",
version = "v1.4.8",
)
go_repository(
name = "com_github_mattn_go_sqlite3",
importpath = "github.com/mattn/go-sqlite3",
sum = "h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU=",
version = "v1.14.8",
)

View File

@ -6,6 +6,10 @@ go_library(
cgo = True,
importpath = "github.com/motiejus/bazel-zig-cc/test",
visibility = ["//visibility:private"],
deps = [
"@com_github_datadog_zstd//:go_default_library",
"@com_github_mattn_go_sqlite3//:go_default_library",
],
)
go_binary(

View File

@ -1,5 +1,10 @@
package main
import (
_ "github.com/DataDog/zstd"
_ "github.com/mattn/go-sqlite3"
)
// #include <stdio.h>
// void helloworld() { printf("hello, world\n"); }
import "C"