Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 0 additions & 69 deletions vendor/traverse-embedder-swift/Package.resolved

This file was deleted.

9 changes: 1 addition & 8 deletions vendor/traverse-embedder-swift/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ let package = Package(
name: "TraverseEmbedder",
platforms: [.iOS(.v17), .macOS(.v14)],
products: [.library(name: "TraverseEmbedder", targets: ["TraverseEmbedder"])],
dependencies: [
.package(url: "https://github.com/swiftwasm/WasmKit.git", exact: "0.2.2"),
// WasmKit 0.2.2 declares `from: 1.5.0`; newer swift-system releases
// collide with its bundled SystemExtras layer on current Xcode.
.package(url: "https://github.com/apple/swift-system.git", exact: "1.5.0"),
],
dependencies: [],
targets: [
.binaryTarget(
name: "TraverseSwiftHost",
Expand All @@ -21,14 +16,12 @@ let package = Package(
name: "TraverseEmbedder",
dependencies: [
"TraverseSwiftHost",
.product(name: "WasmKit", package: "WasmKit"),
]
),
.testTarget(
name: "TraverseEmbedderTests",
dependencies: [
"TraverseEmbedder",
.product(name: "WAT", package: "WasmKit"),
]
),
]
Expand Down
21 changes: 8 additions & 13 deletions vendor/traverse-embedder-swift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ the ordered runtime-shaped events recorded by the harness. Compatible-capability
start, stop, and kill operations return stable instance identifiers and lifecycle
results. It never starts `traverse-cli serve` or uses server-discovery files.

`WasmKitRuntimeBridge` is the production runtime loader. It resolves only the
core WasmKit product, verifies `runtime/runtime.wasm` against its declared
SHA-256 digest and a 32 MiB default artifact limit before parsing, rejects all
ambient imports, and validates the memory, function signatures, and ABI version
required by `runtime-wasm-bridge/1.1.0`, including compatible lifecycle exports.
It never links WasmKitWASI. JSON
marshalling is provided by `WasmKitBridgeClient`, which serializes calls,
copies runtime-owned output before the next mutation, bounds descriptors, and
releases every caller allocation exactly once.
Production execution uses `WasmiHostBridgeClient` backed by the vendored
`TraverseSwiftHost` XCFramework. The client verifies `runtime/runtime.wasm`
against its declared SHA-256 digest and size limits, then invokes the governed
host bridge without linking WasmKit.

`RuntimeTraverseEmbedder` maps that boundary into stable public Swift
submission, event, and compatible-lifecycle result types without synthesizing
Expand All @@ -37,10 +32,10 @@ defaults to the package's `TraverseEmbedder.apiVersion`. Initialization rejects
a bundle declaring a different version with `incompatibleBundle`; it does not
start a sidecar or attempt a network fallback.

The package pins WasmKit 0.2.2 and swift-system 1.5.0 exactly. The accompanying
`dependency-review.json` records why this is the newest reviewed combination
compatible with the package's Swift 6.0 toolchain and discloses the engine's
remaining resource-control limitations.
This package no longer depends on WasmKit or swift-system. Nightly macOS builds
previously failed when SPM resolved a newer swift-system into WasmKit's
`SystemExtras` layer (`Stat` vs `stat`); Wasmi-only keeps the shipping graph
free of that conflict.

The package follows semantic versioning. Additive, backward-compatible API
changes use minor releases; breaking public API or error-semantic changes use a
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Foundation

public struct TraverseBridgeError: Error, Equatable, Sendable {
public let status: Int32
public let message: String

public init(status: Int32, message: String) {
self.status = status
self.message = message
}
}

public protocol TraverseBridgeClient: Sendable {
func initialize(configJSON: Data) throws -> Data
func submit(requestJSON: Data) throws -> Data
func cancel(requestJSON: Data) throws -> Data
func compatibleStart(requestJSON: Data) throws -> Data
func compatibleStop(requestJSON: Data) throws -> Data
func compatibleKill(requestJSON: Data) throws -> Data
func nextEvent() throws -> Data?
func shutdown() throws -> Data
}

This file was deleted.

Loading
Loading