Skip to content

Commit

Permalink
Merge pull request #197 from Hywan/fix-mod-vendor
Browse files Browse the repository at this point in the history
fix(go) Force `go mod vendor` to copy the `packaged/` directory.
  • Loading branch information
Hywan authored Feb 11, 2021
2 parents 786400f + 6955e6d commit bba4ae1
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
default: true
override: true

- uses: Swatinem/rust-cache@v1

- name: Set up Go
uses: actions/setup-go@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions wasmer/cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ package wasmer
//
// #include <wasmer_wasm.h>
import "C"

// See https://github.com/golang/go/issues/26366.
import (
_ "github.com/wasmerio/wasmer-go/wasmer/packaged/include"
_ "github.com/wasmerio/wasmer-go/wasmer/packaged/lib"
)
2 changes: 2 additions & 0 deletions wasmer/packaged/include/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://github.com/golang/go/issues/26366.
package include
Binary file removed wasmer/packaged/lib/darwin-aarch64/libwasmer.dylib
Binary file not shown.
2 changes: 2 additions & 0 deletions wasmer/packaged/lib/darwin-amd64/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://github.com/golang/go/issues/26366.
package darwin_amd64
8 changes: 8 additions & 0 deletions wasmer/packaged/lib/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// See https://github.com/golang/go/issues/26366.
package lib

import (
_ "github.com/wasmerio/wasmer-go/wasmer/packaged/lib/darwin-amd64"
_ "github.com/wasmerio/wasmer-go/wasmer/packaged/lib/linux-aarch64"
_ "github.com/wasmerio/wasmer-go/wasmer/packaged/lib/linux-amd64"
)
2 changes: 2 additions & 0 deletions wasmer/packaged/lib/linux-aarch64/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://github.com/golang/go/issues/26366.
package linux_aarch64
2 changes: 2 additions & 0 deletions wasmer/packaged/lib/linux-amd64/dummy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// See https://github.com/golang/go/issues/26366.
package linux_amd64

0 comments on commit bba4ae1

Please sign in to comment.