diff --git a/entrypoint.go b/entrypoint.go index 6b0ad5f..8552f22 100644 --- a/entrypoint.go +++ b/entrypoint.go @@ -1,11 +1,13 @@ package sdk import ( - "code.icb4dc0.de/buildr/wasi-module-sdk/internal/mem" - rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" "context" + "github.com/mailru/easyjson" _ "github.com/tetratelabs/tinymem" + + "code.icb4dc0.de/buildr/wasi-module-sdk/mem" + rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" ) var defaultRegistry = NewTypeRegistry() diff --git a/examples/hello_world_go/go.mod b/examples/hello_world_go/go.mod index 1faecaf..494427e 100644 --- a/examples/hello_world_go/go.mod +++ b/examples/hello_world_go/go.mod @@ -3,7 +3,7 @@ module hello_world go 1.20 require ( - code.icb4dc0.de/buildr/wasi-module-sdk v0.0.0-00010101000000-000000000000 + code.icb4dc0.de/buildr/wasi-module-sdk-go v0.0.0-00010101000000-000000000000 code.icb4dc0.de/buildr/wasi-module-sdk/integration v0.0.0-00010101000000-000000000000 github.com/mailru/easyjson v0.7.7 golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 diff --git a/go.mod b/go.mod index b0ab55d..26a3c0e 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module code.icb4dc0.de/buildr/wasi-module-sdk +module code.icb4dc0.de/buildr/wasi-module-sdk-go go 1.20 diff --git a/integration/go.mod b/integration/go.mod index 53b3df1..b2d5b85 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -1,9 +1,9 @@ -module code.icb4dc0.de/buildr/wasi-module-sdk/integration +module code.icb4dc0.de/buildr/wasi-module-sdk-go/integration go 1.20 require ( - code.icb4dc0.de/buildr/wasi-module-sdk v0.0.0-00010101000000-000000000000 + code.icb4dc0.de/buildr/wasi-module-sdk-go v0.0.0-00010101000000-000000000000 github.com/google/uuid v1.3.0 github.com/tetratelabs/wazero v1.1.0 golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 diff --git a/integration/test_host.go b/integration/test_host.go index ccdcee8..d0e85e4 100644 --- a/integration/test_host.go +++ b/integration/test_host.go @@ -1,7 +1,6 @@ package integration import ( - "code.icb4dc0.de/buildr/wasi-module-sdk/internal/mem" "context" "crypto/md5" "errors" @@ -9,13 +8,16 @@ import ( "os" "time" - sdk "code.icb4dc0.de/buildr/wasi-module-sdk" - rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" + "code.icb4dc0.de/buildr/wasi-module-sdk/mem" + "github.com/google/uuid" "github.com/tetratelabs/wazero" "github.com/tetratelabs/wazero/api" "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1" "golang.org/x/exp/slog" + + sdk "code.icb4dc0.de/buildr/wasi-module-sdk" + rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" ) func StateKey(cat sdk.Category, modName, key string) string { diff --git a/logger.go b/logger.go index 08f5dd2..6e12fec 100644 --- a/logger.go +++ b/logger.go @@ -4,10 +4,12 @@ package sdk import "C" import ( - "code.icb4dc0.de/buildr/wasi-module-sdk/internal/mem" - rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" "context" + "golang.org/x/exp/slog" + + "code.icb4dc0.de/buildr/wasi-module-sdk/mem" + rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" ) var _ slog.Handler = (*WASIHandler)(nil) diff --git a/internal/mem/unmanaged.go b/mem/unmanaged.go similarity index 100% rename from internal/mem/unmanaged.go rename to mem/unmanaged.go diff --git a/state_proxy.go b/state_proxy.go index 356f783..579f14e 100644 --- a/state_proxy.go +++ b/state_proxy.go @@ -1,9 +1,10 @@ package sdk import ( - "code.icb4dc0.de/buildr/wasi-module-sdk/internal/mem" - rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" "errors" + + "code.icb4dc0.de/buildr/wasi-module-sdk/mem" + rpcv1 "code.icb4dc0.de/buildr/wasi-module-sdk/protocol/generated/rpc/v1" ) type StateProxy struct {