refactor binary encoding to its own package (#1187)

move binary encoder to its own package

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
This commit is contained in:
Edoardo Vacchi
2023-03-03 00:21:22 +01:00
committed by GitHub
parent e2660b3f17
commit 117474c477
56 changed files with 1042 additions and 608 deletions

View File

@@ -21,6 +21,7 @@ import (
"github.com/tetratelabs/wazero/internal/fstest"
internalgojs "github.com/tetratelabs/wazero/internal/gojs"
"github.com/tetratelabs/wazero/internal/gojs/run"
"github.com/tetratelabs/wazero/internal/testing/binaryencoding"
"github.com/tetratelabs/wazero/internal/wasm"
binaryformat "github.com/tetratelabs/wazero/internal/wasm/binary"
)
@@ -115,7 +116,7 @@ func TestMain(m *testing.M) {
// Set max to a high value, e.g. so that Test_stdio_large can pass
parsed.MemorySection.Max = 1024 // 64MB
parsed.MemorySection.IsMaxEncoded = true
testBin = binaryformat.EncodeModule(parsed)
testBin = binaryencoding.EncodeModule(parsed)
// Seed wazero's compilation cache to see any error up-front and to prevent
// one test from a cache-miss performance penalty.