Releases: swiftwasm/JavaScriptKit
0.44.1: BridgeJS MVP
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
- Prevent cross-module inlining of remaining @_extern(wasm) functions by @fjtrujy in #631
- CI: Use debug builds for SwiftSyntax in ./Examples/Embedded by @kateinoigakukun in #632
Full Changelog: 0.44.0...0.44.1
0.44.0: BridgeJS MVP
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 classin 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.PrintCodeContextby @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
JSUndefinedOrAPIs 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 structby @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
0.43.1
0.43.0
What's Changed
- BridgeJS: Generate Swift doc-comment based on JSDoc by @kateinoigakukun in #596
- BridgeJS: Improve diagnostics and fix-its for macros by @kateinoigakukun in #597
- BridgeJS: Add
JSTypedClosureAPI by @kateinoigakukun in #578
Full Changelog: 0.42.1...0.43.0
0.42.1
What's Changed
Full Changelog: 0.42.0...0.42.1
0.42.0
What's Changed
- [NFC] BridgeJS: Add push/pop JS codegen helpers by @kateinoigakukun in #587
- [NFC] BridgeJS: Remove explicit stack storage captures from enum/struct helpers by @kateinoigakukun in #588
- BridgeJS: Add Dictionary support by @kateinoigakukun in #581
- PackageToJS: Fix skeleton file discovery path for build plugin output by @krodak in #591
- [NFC] BridgeJS: Remove remaining explicit captures from enum/struct helpers by @kateinoigakukun in #589
- Add ts2swift Record to Dictionary mapping by @kateinoigakukun in #582
- BridgeJS: Add missing
functionkeyword for namespace function declarations in TypeScript by @krodak in #592 - [NFC] BridgeJS: Make Stack ABI storage direction agnostic by @kateinoigakukun in #590
Full Changelog: 0.41.0...0.42.0
0.41.0
What's Changed
- BridgeJS: Fix namespace enum with
@JS(namespace:)attribute by @krodak in #562 - BridgeJS: Add intrinsic extensions for stack-based lifting and refactor Swift glue code generation to use them by @krodak in #554
- BridgeJS: Re-organize snapshot test structure by @kateinoigakukun in #561
- BridgeJS: Enforce throws(JSException) on @js protocol methods by @krodak in #563
- Revert "BridgeJS: Enforce throws(JSException) on @js protocol methods" by @kateinoigakukun in #565
- BridgeJS: Add JSObject and @jsclass struct support for arrays and struct by @krodak in #566
- TS2Swift: Skip type checks when translating TS -> Swift by @kateinoigakukun in #567
- BridgeJS: emit typed throws without extra space by @kateinoigakukun in #571
- BridgeJS: Support static @JSFunction imports by @kateinoigakukun in #568
- BridgeJS: T | null and T | undefined support by @kateinoigakukun in #569
- [NFC] BridgeJS: Avoid emitting empty skeletons by @kateinoigakukun in #574
- [NFC] BridgeJS: Omit trailing spaces on empty lines in generated JS code by @kateinoigakukun in #575
- BridgeJS: Perf-tune
SwiftToSkeletonby avoiding unnecessary Syntax node allocation by @kateinoigakukun in #577 - BridgeJS: Add JSValue parameter/return support by @kateinoigakukun in #570
- BridgeJS: Support all missing types as associated values in exported enums by @krodak in #579
- build-examples.sh: re-enable Embedded example package by @MaxDesiatov in #490
- BridgeJS: Import-side Array Support by @krodak in #573
- BridgeJS: Fix throws hint spacing by @kateinoigakukun in #584
- [NFC] BridgeJS: Split out OptionalSupportTests.swift by @kateinoigakukun in #583
- BridgeJS: Fix optional String return handling in generated JS glue code by @kateinoigakukun in #585
- BridgeJS: Add support for
[JSValue]by @kateinoigakukun in #580 - BridgeJS: Skip directories in generate input file processing by @krodak in #586
Full Changelog: 0.40.0...0.41.0
0.40.0
What's Changed
- BridgeJS: support jsName for imported bindings by @kateinoigakukun in #526
- BridgeJS: support UnsafePointer-family types by @kateinoigakukun in #525
- BridgeJS: add init(unsafelyCopying:) for @js structs by @kateinoigakukun in #527
- Turn JSValue from enum to struct to have flexibility for future changes by @kateinoigakukun in #528
- BridgeJS: allow imports from globalThis by @kateinoigakukun in #530
- Benchmarks: optional-return cases and runner tweaks by @kateinoigakukun in #529
- BridgeJS: Remove unnecessary helper enums for struct bridging by @kateinoigakukun in #532
- BridgeJS: Use let for non-mutated __bjs_self in generated toJSObject() by @krodak in #531
- BridgeJS: Fix codegen for Float/Double raw value enums in struct fields and optional context by @krodak in #533
- BridgeJS: Support
@JSSwift struct types in imported JS signatures by @kateinoigakukun in #535 - NFC: BridgeJS: Rename raise to lift in struct and enum helpers by @krodak in #539
- Bump playwright from 1.52.0 to 1.55.1 by @dependabot[bot] in #538
- BridgeJS: Swift Array support by @krodak in #542
- Re-apply Playwright upgrade by @kateinoigakukun in #550
- Add opt-in tracing hooks for JS bridge by @kateinoigakukun in #548
- BridgeJS: Array benchmarks by @krodak in #549
- BridgeJS: Add UInt support by @krodak in #551
- Fix
ExperimentalCustomExecutorsSPI import build issues by @kateinoigakukun in #552 - [BridgeJS] Formalizing ABI Part 1 by @kateinoigakukun in #553
- Fix: Ensure
BridgeJS.Macros.swiftis processed bySwiftToSkeletonby @fjtrujy in #556 - Fix missing comma in @_expose attribute for SwiftSyntax602 by @zhiqipan in #555
- Examples: Build SwiftSyntax in debug mode for macro plugins by @kateinoigakukun in #558
- BridgeJS: Fix macro test suites silently ignoring failures by @kateinoigakukun in #559
New Contributors
Full Changelog: 0.39.0...0.40.0
0.39.0
What's Changed
- BridgeJS: Remove call to
getImportswhen no JS interface is imported by @kateinoigakukun in #492 - BridgeJS: Fix enumHelper availability by @krodak in #493
- BridgeJS: Unify JS function calling convention code emission by @kateinoigakukun in #494
- Drop Swift 6.0 support by @kateinoigakukun in #500
- BridgeJS: Macro-annotated import notations by @kateinoigakukun in #499
- chore: Update main README.md to mention BridgeJS and link more articles by @krodak in #502
- chore: Minor updates to BridgeJS documentation by @krodak in #503
- BridgeJS: Generate
_JSBridgedClassconformance via macro by @kateinoigakukun in #504 - [BridgeJS] Support @js var declarations for global scope imports by @kateinoigakukun in #505
- TS2Swift: Remove unused type definitions by @kateinoigakukun in #507
- [BridgeJS][ImportTS] Support
export { thing } from "pkg"form inbridge-js.d.tsby @kateinoigakukun in #506 - Test building
BridgeJSToolon macOS on CI by @MaxDesiatov in #511 - BridgeJS: Relax SwiftSyntax version constraint to support 602 and 603 by @kateinoigakukun in #513
- BridgeJS: Remove adhoc
exportedProtocolNameByKeyrecording by @kateinoigakukun in #514 - BridgeJS: Merge small core files into single Misc.swift by @kateinoigakukun in #515
- Add SwiftToSkeleton unified Swift-to-skeleton API by @kateinoigakukun in #516
- PackageToJS: Rename SWIFT_PATH to SWIFT_BIN_PATH env var by @kateinoigakukun in #518
- BridgeJS: Unify Swift type lookup logic between import/export by @kateinoigakukun in #517
- BridgeJS: Add internal debug tool for inspecting intermediate stages by @kateinoigakukun in #519
- BridgeJS: Remove BridgeType usage from ts2swift by @kateinoigakukun in #520
- BridgeJS: Import TypeScript enums into Swift by @kateinoigakukun in #521
- BridgeJS: allow exported APIs to use imported @jsclass types by @kateinoigakukun in #522
- Restrict @jsclass to structs by @kateinoigakukun in #523
- BridgeJS: support closure types in imported JS APIs by @kateinoigakukun in #524
Full Changelog: 0.38.0...0.39.0
0.38.0
What's Changed
- BridgeJS: Fix ordering issue with multiple stack based parameters by @krodak in #472
- Add Node.js example by @kateinoigakukun in #473
- build: Allow swift-syntax 6.2.0 by @scottmarchant in #474
- workflows/test.yml: update
mainsnapshots, add 6.3 snapshot by @MaxDesiatov in #476 - BridgeJS: Swift struct support by @krodak in #479
- BridgeJS: Enable struct as default parameter and enable default parameters in struct init / methods by @krodak in #480
- BridgeJS: Struct and struct vs classes benchmarks by @krodak in #481
- [NFC] BridgeJS: Codegen code organisation and minor cleanups by @krodak in #482
- Fix typo: rename
BridgeJSInstrincicstoBridgeJSIntrinsicsby @MaxDesiatov in #485 - Use
swift formatcommand provided by the Swift toolchain by @MaxDesiatov in #484 - Fix
Examples/Embeddednot building with Swift 6.2.3 by @MaxDesiatov in #483 - BridgeJS: Fix multifile declaration resolution order issue by @kateinoigakukun in #488
- Documentation: Add JavaScript Interop Cheat Sheet by @kateinoigakukun in #491
New Contributors
- @scottmarchant made their first contribution in #474
Full Changelog: 0.37.0...0.38.0