Skip to content

0.44.0: BridgeJS MVP

Choose a tag to compare

@kateinoigakukun kateinoigakukun released this 13 Feb 06:49
· 75 commits to main since this release

BridgeJS MVP Release! 🌉

This release marks the MVP of BridgeJS, a new interop mechanism that makes Swift-JavaScript interop faster, easier, and type-safe for WebAssembly apps.
With BridgeJS, you declare the shape of your API using Swift macros (or optionally TypeScript definitions), and the tool generates specialized glue code in both directions, exporting Swift to JavaScript and importing JavaScript into Swift.

Compared to the dynamic JSObject/JSValue APIs, BridgeJS offers significantly better performance through specialized codegen, compile-time type safety, and less boilerplate.

See the BridgeJS documentation to get started.

Note

You can quickly preview what interfaces will be exposed on the Swift/JavaScript/TypeScript sides using the BridgeJS Playground.

What's Changed

  • BridgeJS: show unified diff on snapshot mismatch by @kateinoigakukun in #600
  • [NFC] BridgeJS: Cover more types in closure snapshot tests by @kateinoigakukun in #602
  • [NFC] Fix warnings by @kateinoigakukun in #603
  • BridgeJS: Support @JS class in imported function signatures by @kateinoigakukun in #601
  • BridgeJS: Add profiling instrumentation by @kateinoigakukun in #604
  • BridgeJS: Deduplicate closure signature collection logic by @kateinoigakukun in #605
  • [NFC] BridgeJS: Make JSGlueGen and IntrinsicJSFragment methods throwable by @kateinoigakukun in #606
  • [NFC] BridgeJS: Move CodeFragmentPrinter to BridgeJSCore by @kateinoigakukun in #607
  • BridgeJS: Fix optional Swift heap object handling for imported interface by @kateinoigakukun in #608
  • BridgeJS: Add IntrinsicJSFragment.PrintCodeContext by @kateinoigakukun in #609
  • BridgeJS: Unify closure JS glue lift/lower by @kateinoigakukun in #610
  • Bump actions/setup-node from 4 to 6 by @dependabot[bot] in #613
  • BridgeJS: Fix incorrect TypeScript type names for tsEnum-style enums and struct associated values by @krodak in #614
  • BridgeJS: Update JSUndefinedOr APIs by @kateinoigakukun in #615
  • BridgeJS: Include source-context in diagnostic messages by @kateinoigakukun in #616
  • BridgeJS: Check generated TypeScript validity in test suites by @krodak in #611
  • BridgeJS: Remove BasicFormat usage in ExportSwift by @kateinoigakukun in #617
  • NCF: BridgeJS: Generalize Optional stack ABI for Array, Dictionary, and Struct types by @krodak in #618
  • NFC: BridgeJS: Delegate nested container codegen to generic runtime conformances by @krodak in #619
  • [NFC] BridgeJS: Remove tag stack and use i32 stack for enum case tags by @kateinoigakukun in #620
  • [NFC] BridgeJS: Minimize enum with assoc values code generation by @kateinoigakukun in #621
  • NFC: BridgeJS: Simplify liftExpression by using no-arg bridgeJSLiftParameter() for enums and protocols by @krodak in #623
  • NFC: BridgeJS: Simplify ExportSwift codegen by removing redundant branches and extracting helpers by @krodak in #624
  • NFC: BridgeJS: Further simplify codegen and JSValue intrinsics by @krodak in #625
  • Fix ts2swift alias struct naming and docs by @kateinoigakukun in #627
  • BridgeJS: Consolidate optional and pointer runtime intrinsics by @krodak in #626
  • Benchmarks: Prevent cross-module inlining of f32/f64 @_extern(wasm) functions by @krodak in #628
  • BridgeJS: add runtime coverage for public @JS struct by @kateinoigakukun in #629
  • BridgeJS: Prepare for MVP release for documentation and relaxing feature gates by @kateinoigakukun in #630

Full Changelog: 0.43.1...0.44.0