Skip to content

BridgeJS: Import-side Array Support #573

Merged
krodak merged 1 commit intoswiftwasm:mainfrom
PassiveLogic:krodak/import-array
Feb 4, 2026
Merged

BridgeJS: Import-side Array Support #573
krodak merged 1 commit intoswiftwasm:mainfrom
PassiveLogic:krodak/import-array

Conversation

@krodak
Copy link
Member

@krodak krodak commented Feb 4, 2026

Overview

Hey @kateinoigakukun, this is a PR where I tried implementing import-side array support for BridgeJS. I noticed your PR #572 covers the same area, so I integrated some of the fixes from there (like stackLoweringStmts, Array: _BridgedSwiftStackType conformance, the let _ = pattern, and the liftReturn fix for 0-param fragments).

Hopefully some parts of this can help you finalise your PR. Feel free to close if not needed.

Additional bits not in #572

  • processor.js: TypeScript array type detection using checker.isArrayType() so number[] generates [Double] instead of JSObject
  • E2E import tests: Added bridge-js.d.ts declarations, Swift test cases, and JS implementations for:
    • jsRoundTripNumberArray / jsRoundTripStringArray / jsRoundTripBoolArray
    • jsSumNumberArray / jsCreateNumberArray

@krodak krodak self-assigned this Feb 4, 2026
@kateinoigakukun
Copy link
Member

kateinoigakukun commented Feb 4, 2026

Thanks! My today's plans are to finalize #570 first, then resume #572. But feel free to take it over the Array support if you have bandwidth. Either way, your PR seems valuable, thanks!

@krodak
Copy link
Member Author

krodak commented Feb 4, 2026

@kateinoigakukun I'd try it out as was interested to have a look on import side, just got postponed with yesterday's work.
Can integrate and finalise after your #570

@krodak krodak force-pushed the krodak/import-array branch from 529291a to 16a3894 Compare February 4, 2026 13:12
@krodak
Copy link
Member Author

krodak commented Feb 4, 2026

@kateinoigakukun I think this is actually ready for review now, if I'm not mistaken, it could be treated as finalized #572

@kateinoigakukun
Copy link
Member

Oh, I thought it's still WIP just because of the PR description 😅

@krodak
Copy link
Member Author

krodak commented Feb 4, 2026

I needed to double check everything against #572, as I wasn't that confident on import-side implementation, but should be good and rebased now 🙏🏻

@kateinoigakukun
Copy link
Member

Let's go ahead :shipit:

@krodak krodak force-pushed the krodak/import-array branch from 101068a to 43a05d9 Compare February 4, 2026 17:43
@krodak krodak merged commit 0ea3733 into swiftwasm:main Feb 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants