From d2b444db7f67830643649c362f65138bcb85329d Mon Sep 17 00:00:00 2001 From: Ryan MacArthur Date: Mon, 25 Sep 2023 13:10:15 -0800 Subject: [PATCH 1/3] adding support for wasi go 1.21 added wasi preview 1 --- app_wasip1.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 app_wasip1.go diff --git a/app_wasip1.go b/app_wasip1.go new file mode 100644 index 000000000..0e82ae012 --- /dev/null +++ b/app_wasip1.go @@ -0,0 +1,28 @@ +// Copyright (c) 2023 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +//go:build wasip1 && wasm + +package fx + +import "syscall" + +const _sigINT = syscall.SIGINT +const _sigTERM = syscall.SIGTERM From 4376f66fed10daf3279364c643ad33e091a4dc81 Mon Sep 17 00:00:00 2001 From: Ryan MacArthur Date: Wed, 27 Sep 2023 19:09:08 -0400 Subject: [PATCH 2/3] Update app_wasm.go for wasi --- app_wasm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app_wasm.go b/app_wasm.go index 2468fed7e..5e2ca8d01 100644 --- a/app_wasm.go +++ b/app_wasm.go @@ -18,8 +18,8 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -//go:build js && wasm -// +build js,wasm +//go:build (js && wasm) || (wasip1 && wasm) +// +build js,wasm wasip1,wasm package fx From c7e270e29aec255c0b509325eda4b21bc9f0da02 Mon Sep 17 00:00:00 2001 From: Ryan MacArthur Date: Wed, 27 Sep 2023 19:10:30 -0400 Subject: [PATCH 3/3] rm wasi build file --- app_wasip1.go | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 app_wasip1.go diff --git a/app_wasip1.go b/app_wasip1.go deleted file mode 100644 index 0e82ae012..000000000 --- a/app_wasip1.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -//go:build wasip1 && wasm - -package fx - -import "syscall" - -const _sigINT = syscall.SIGINT -const _sigTERM = syscall.SIGTERM