目录
目录README.md

WasmTransformer

Test

A package which provides transformation operation for WebAssembly binary. Inspired by Rust implementation

Available transformations

lowerI64Imports

public func lowerI64Imports(_ input: [UInt8]) throws -> [UInt8]

Inserts trampoline functions for imports that have i64 params or returns. This is useful for running Wasm modules in browsers that do not support JavaScript BigInt -> Wasm i64 integration. Especially in the case for i64 WASI Imports.

stripCustomSections

public func stripCustomSections(_ input: [UInt8]) throws -> [UInt8]

Strip all custom sections from input WebAssembly binary.

Testing

  1. Set environment variable SWIFT_TOOLCHAIN to the path to your SwiftWasm toolchain. e.g. $HOME/Library/Developer/Toolchains/swift-wasm-5.7.3-RELEASE.xctoolchain/usr
  2. Set up testing fixtures by: (cd ./Fixtures/ && npm install && npm run build && make all)
  3. Run swift test
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号