Skip to content

Fix Benchmarks build by regen bridge-js files #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
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
16 changes: 12 additions & 4 deletions Benchmarks/Sources/Generated/ExportSwift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@
//
// To update this file, just rebuild your project or run
// `swift package bridge-js`.

@_spi(JSObject_id) import JavaScriptKit

@_extern(wasm, module: "bjs", name: "return_string")
private func _return_string(_ ptr: UnsafePointer<UInt8>?, _ len: Int32)
@_extern(wasm, module: "bjs", name: "init_memory")
private func _init_memory(_ sourceId: Int32, _ ptr: UnsafeMutablePointer<UInt8>?)

@_expose(wasm, "bjs_main")
@_cdecl("bjs_main")
public func _bjs_main() -> Void {
main()
@_extern(wasm, module: "bjs", name: "swift_js_retain")
private func _swift_js_retain(_ ptr: Int32) -> Int32
@_extern(wasm, module: "bjs", name: "swift_js_throw")
private func _swift_js_throw(_ id: Int32)

@_expose(wasm, "bjs_run")
@_cdecl("bjs_run")
public func _bjs_run() -> Void {
run()
}
3 changes: 0 additions & 3 deletions Benchmarks/Sources/Generated/ImportTS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ private func _make_jsstring(_ ptr: UnsafePointer<UInt8>?, _ len: Int32) -> Int32
@_extern(wasm, module: "bjs", name: "init_memory_with_result")
private func _init_memory_with_result(_ ptr: UnsafePointer<UInt8>?, _ len: Int32)

@_extern(wasm, module: "bjs", name: "free_jsobject")
private func _free_jsobject(_ ptr: Int32) -> Void

func benchmarkHelperNoop() -> Void {
@_extern(wasm, module: "Benchmarks", name: "bjs_benchmarkHelperNoop")
func bjs_benchmarkHelperNoop() -> Void
Expand Down
8 changes: 6 additions & 2 deletions Benchmarks/Sources/Generated/JavaScript/ExportSwift.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
],
"functions" : [
{
"abiName" : "bjs_main",
"name" : "main",
"abiName" : "bjs_run",
"effects" : {
"isAsync" : false,
"isThrows" : false
},
"name" : "run",
"parameters" : [

],
Expand Down