Skip to content

[pull] main from swiftwasm:main - #7

Open
pull[bot] wants to merge 1275 commits into
majacQ:mainfrom
swiftwasm:main
Open

[pull] main from swiftwasm:main#7
pull[bot] wants to merge 1275 commits into
majacQ:mainfrom
swiftwasm:main

Conversation

@pull

@pull pull Bot commented Jul 19, 2021

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull Bot added ⤵️ pull merge-conflict Resolve conflicts manually labels Jul 19, 2021
@atomist atomist Bot added auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge-method:merge Auto-merge with merge commit auto-merge:on-bpr-success Auto-merge on passed branch protection rule labels Jul 19, 2021
@pull pull Bot removed auto-branch-delete:on-close Delete branch when pull request gets closed auto-merge-method:merge Auto-merge with merge commit auto-merge:on-bpr-success Auto-merge on passed branch protection rule labels Jul 19, 2021
kateinoigakukun and others added 22 commits February 11, 2026 22:48
* BridgeJS: Allow executing TS2SwiftVitestTests on Xcode

* BridgeJS: Remove parsing API usage from JSSetterMacro

* BridgeJS: Remove BasicFormat usage in ExportSwift
NCF: BridgeJS: Generalize Optional stack ABI for Array, Dictionary, and Struct types
…fication

NFC: BridgeJS: Delegate nested container codegen to generic runtime conformances
[NFC] BridgeJS: Minimize enum with assoc values code generation
…tion

NFC: BridgeJS: Simplify liftExpression by using no-arg bridgeJSLiftParameter() for enums and protocols
NFC: BridgeJS: Simplify ExportSwift codegen by removing redundant branches and extracting helpers
NFC: BridgeJS: Further simplify codegen and JSValue intrinsics
Fix ts2swift alias struct naming and docs
BridgeJS: Consolidate optional and pointer runtime intrinsics
Benchmarks: Prevent cross-module inlining of f32/f64 @_extern(wasm) functions
BridgeJS: add runtime coverage for public JS structs
krodak and others added 30 commits July 1, 2026 23:06
BridgeJS: Fix issues exporting nested types
…oding

BridgeJS: Unify optional stack encoding to presence-flag form
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6 to 7.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…rder

BridgeJS: Fix argument order for stack-lowered imported parameters
…origins (#795)

* BridgeJS: support importing from external ECMAScript modules

Extend `from: .module(...)` to accept bare specifiers like `node:path` or an npm package,
add `jsName: .default` for default exports, and emit named imports so a wrong export name
now fails at module-link time instead of at call time.

* BridgeJS: fix named-import regressions found in review

Do not require a module export for a wrapper-only `@JSClass`, since a named import is a
link-time requirement and nothing looks that name up; accept `jsName: nil` and the explicit
`.name(...)` spelling; and validate the tagged `from` form like the plain-string form.

* BridgeJS: split snippet and external module import origins

Use `from: .snippet("/my-file.js")` for a JavaScript file shipped with the Swift target and
`from: .module("node:path")` for an external module, so each keeps its own validation and
each mistaken form points at the other. The skeleton encoding is unchanged.

* BridgeJS: tag both snippet and module origins in the skeleton

Encode `.snippet` as `{"kind":"snippet","path":...}` alongside the existing tagged module
form, so the JSON mirrors the Swift cases and a snippet path can no longer encode into a
shape that fails to decode.
bridgeJSLowerParameter for structs used toJSObject(), so Swift→JS
callbacks discarded the stack and JS lift() read garbage. Match arrays:
stack-push on lower, and use the same ABI for ImportTS non-optional structs.
BridgeJS: Unify @js struct parameter lowering onto the stack ABI
BridgeJS: Support generic functions on imported JS APIs
An imported optional whose payload is stack-only ([T]?, [String: V]?,
@js struct?) used a hybrid convention: the isSome flag crossed as a wasm
i32 parameter while the payload was conditionally pushed onto the shared
stacks. Optional returns and optional array elements of the same types
already travel entirely on the stacks: payload first, then a 0/1 flag on
the i32 stack.

This lowers those parameters the same way. The Swift thunk pushes the
payload (if some) followed by the flag, the wasm signature carries no
argument for the parameter, and the JS handler pops the flag before
conditionally lifting the payload, through the same fragment already
used for optional returns and elements.

The hybrid shape was the last parameter category that both passed a wasm
argument and pushed stack data, which is what enabled the argument
transposition fixed in #794. Every stack-touching parameter is now
flagless and reverse-ordered, matching returns and elements. All other
optional parameter ABIs (scalars, strings, JSObject, closures, enums,
heap objects) are unchanged.
BridgeJS: Lower imported optional stack parameters fully on the stack
BridgeJS: Allow extensions to contain types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.