diff --git a/core.go b/core.go index f05941d..7fec75c 100644 --- a/core.go +++ b/core.go @@ -17,7 +17,7 @@ import ( "github.com/tetratelabs/wazero/experimental/sys" "github.com/tetratelabs/wazero/imports/wasi_snapshot_preview1" - "github.com/karelbilek/wazero-fs-tools/memfs" + "github.com/gaukas/wazerofs/memfs" expsysfs "github.com/tetratelabs/wazero/experimental/sysfs" ) diff --git a/go.mod b/go.mod index 8735797..7accc43 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,17 @@ module github.com/refraction-networking/water -go 1.22.0 +go 1.21 retract ( v0.6.1 // bad submodule v0.6.0 // bad LICENSE naming ) -replace github.com/tetratelabs/wazero v1.7.0 => github.com/refraction-networking/wazero v1.7.0-w +replace github.com/tetratelabs/wazero => github.com/refraction-networking/wazero v1.7.1-w require ( - github.com/karelbilek/wazero-fs-tools v0.0.0-20240317201741-fc5622f5bd12 - github.com/tetratelabs/wazero v1.7.0 - golang.org/x/exp v0.0.0-20240119083558-1b970713d09a + github.com/gaukas/wazerofs v0.1.0 + github.com/tetratelabs/wazero v1.7.1 google.golang.org/protobuf v1.33.0 ) diff --git a/go.sum b/go.sum index 7eb2f35..48d38e3 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ github.com/blang/vfs v1.0.0 h1:AUZUgulCDzbaNjTRWEP45X7m/J10brAptZpSRKRZBZc= github.com/blang/vfs v1.0.0/go.mod h1:jjuNUc/IKcRNNWC9NUCvz4fR9PZLPIKxEygtPs/4tSI= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/karelbilek/wazero-fs-tools v0.0.0-20240317201741-fc5622f5bd12 h1:2BGAdZ5gPGtRgLawYeDR2XTjWoi38kNYVF8vzrESQDw= -github.com/karelbilek/wazero-fs-tools v0.0.0-20240317201741-fc5622f5bd12/go.mod h1:Ed3NLyTuuJ7rNUITSo+wEvMbRLwYjslaE5w8q/UWoEA= -github.com/refraction-networking/wazero v1.7.0-w h1:fFQO1VL+fhpFWIgfZN9FPnWYhf5DTyzwzJijqg/LUm4= -github.com/refraction-networking/wazero v1.7.0-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= -golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +github.com/gaukas/wazerofs v0.1.0 h1:wIkW1bAxSnpaaVkQ5LOb1tm1BXdVap3eKjJpVWIqt2E= +github.com/gaukas/wazerofs v0.1.0/go.mod h1:+JECB9Fwt0taPqSgHckG9lmT3tcoVK+9VJozTsq9UlI= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/refraction-networking/wazero v1.7.1-w h1:z7Ty5PsMkJEDBCsn3ELUjceQGBT0FMVGldOSpDK3giQ= +github.com/refraction-networking/wazero v1.7.1-w/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/internal/log/slog_alias_old.go b/internal/log/slog_alias_old.go deleted file mode 100644 index 8e04aa8..0000000 --- a/internal/log/slog_alias_old.go +++ /dev/null @@ -1,39 +0,0 @@ -//go:build !go1.21 - -package log - -import ( - "golang.org/x/exp/slog" -) - -// Logger is an alias for slog.Logger. It is used here to avoid -// importing slog in the rest of the code, since slog needs to be -// imported conditionally based on the Go version. -type Logger = slog.Logger -type Handler = LogHandler // Deprecated: use LogHandler. The naming of this type is ambiguous. -type LogHandler = slog.Handler - -var defaultLogger *Logger = slog.Default() - -// SetLogger specifies the logger to be used by the package. -// By default, slog.Default() is used. -// -// It overrides the logger created by SetDefaultHandler. -func SetDefaultLogger(logger *Logger) { - defaultLogger = logger -} - -// SetDefaultHandler specifies the handler to be used by the package. -// -// It overrides the logger specified by SetDefaultLogger. -func SetDefaultHandler(handler LogHandler) { - defaultLogger = slog.New(handler) -} - -// DefaultLogger returns the current default logger. -// -// It might not be equivalent to slog.Default() if SetDefaultLogger -// or SetDefaultHandler was called before. -func DefaultLogger() *Logger { - return defaultLogger -}