Swiftpack.co -  Package - kateinoigakukun/chibi-link
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
kateinoigakukun/chibi-link
A toy linker for WebAssembly object files.
.package(url: "https://github.com/kateinoigakukun/chibi-link.git", from: "1.1.0")

chibi-link

A toy linker for WebAssembly object files.

Features

  • Support linking object files produced by LLVM
  • Pure Swift
  • No Foundation dependency

How to use

Link

$ swift run lib.o main.o -o output.wasm

Link WebAssembly on WebAssembly runtime 😲

$ ~/Library/Developer/Toolchains/swift-wasm-5.3.0-RELEASE.xctoolchain/usr/bin/swift --version
SwiftWasm Swift version 5.3 (swiftlang-5.3.0)
Target: x86_64-apple-darwin19.6.0

$ ~/Library/Developer/Toolchains/swift-wasm-5.3.0-RELEASE.xctoolchain/usr/bin/swift build --triple wasm32-unknown-wasi
$ wasmtime run --mapdir=/var/tmp::$(pwd) .build/wasm32-unknown-wasi/release/chibi-link.wasm -- \
  /var/tmp/lib.o /var/tmp/main.o -o /var/tmp/output.wasm

GitHub

link
Stars: 11
Last commit: 3 weeks ago

Release Notes

18 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco