Sitelet https://github.com/PassiveLogic/JavaScriptKit/compare/main...swiftwasm:JavaScriptKit:main
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PassiveLogic/JavaScriptKit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: swiftwasm/JavaScriptKit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 20 commits
  • 201 files changed
  • 3 contributors

Commits on Aug 11, 2026

  1. Configuration menu
    Copy the full SHA
    30d994d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e10836b View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2026

  1. Configuration menu
    Copy the full SHA
    ccd828b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c58ffa4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d13c994 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a099736 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    81dee2f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bf00750 View commit details
    Browse the repository at this point in the history
  7. Merge pull request swiftwasm#799 from PassiveLogic/kr/stack-abi-gener…

    …ics-import
    
    BridgeJS: Support generic functions on imported JS APIs
    krodak authored Aug 13, 2026
    Configuration menu
    Copy the full SHA
    3966530 View commit details
    Browse the repository at this point in the history
  8. BridgeJS: Lower imported optional stack parameters fully on the stack

    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 swiftwasm#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.
    krodak committed Aug 13, 2026
    Configuration menu
    Copy the full SHA
    f998117 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2026

  1. Configuration menu
    Copy the full SHA
    9750486 View commit details
    Browse the repository at this point in the history
  2. Merge pull request swiftwasm#802 from PassiveLogic/kr/optional-param-…

    …stack-flag
    
    BridgeJS: Lower imported optional stack parameters fully on the stack
    krodak authored Aug 14, 2026
    Configuration menu
    Copy the full SHA
    c3ac9da View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2026

  1. Configuration menu
    Copy the full SHA
    2e36a76 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b453a5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae935a9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    59a6274 View commit details
    Browse the repository at this point in the history
  5. Merge pull request swiftwasm#803 from wfltaylor/extension-types

    BridgeJS: Allow extensions to contain types
    krodak authored Aug 17, 2026
    Configuration menu
    Copy the full SHA
    7a7a70a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    372fce2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8f4c851 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2026

  1. PackageToJS: Derive WASI and shared memory support from wasm imports (s…

    …wiftwasm#807)
    
    * PackageToJS: Derive WASI and shared memory support from wasm imports
    
    The SwiftBuild backend's build directory doesn't encode the target triple, so
    detect the traits derived from it by parsing the imports of the product binary
    instead. The imports are now parsed as a part of the packaging build graph.
    
    * Avoid `import var Foundation.stderr`
    
    ```
    $ echo "@preconcurrency import var Foundation.stderr" | swiftly run +main-snapshot-2026-08-11 swiftc  - -o /dev/null
    <stdin>:1:28: error: ambiguous name 'stderr' in module 'Foundation'
    1 | @preconcurrency import var Foundation.stderr
      |                            `- error: ambiguous name 'stderr' in module 'Foundation'
    2 |
    
    Glibc.stderr:1:32: note: found this candidate
    1 | nonisolated(unsafe) public var stderr: UnsafeMutablePointer<FILE>! { get }
      |                                `- note: found this candidate
    
    /usr/include/stdio.h:151:14: note: found this candidate
    149 | extern FILE *stdin;               /* Standard input stream.  */
    150 | extern FILE *stdout;              /* Standard output stream.  */
    151 | extern FILE *stderr;              /* Standard error output stream.  */
        |              `- note: found this candidate
    152 | /* C89/C99 say they're macros.  Make them happy.  */
    153 | #define stdin stdin
    ```
    
    swiftlang/swift#89891
    
    * CI: Install Swift toolchain preserving its usr/bin layout
    
    Flattening the tarball into /usr/local makes SwiftPM derive a bogus
    toolchain root, so the swiftbuild build system cannot find swiftc.
    
    * PackageToJS: Record every import kind while parsing wasm imports
    
    Only memory imports were collected, so `WasmFeatures.isWASI` never saw
    `wasi_snapshot_preview1` and the generated node.js dropped the WASI import
    while still constructing a WASI instance.
    
    * PackageToJS: run per-target test runners under the swiftbuild build system
    
    `swift package js test` assumed the native build system's single combined
    `<Package>PackageTests` binary: it looked for one `.wasm`/`.xctest` under
    `.build/<config>/`, packaged it, and ran it.
    
    SwiftBuild produces no combined test binary. It emits one
    `<TestTarget>-test-runner.wasm` per test target under `.build/out/Products/`,
    plus an aggregate target that only orchestrates building them, so the old
    lookup failed with "Failed to find 'JavaScriptKitPackageTests.wasm'".
    
    (cherry picked from commit c12c7e9)
    
    * Install the JS event loop executor in async test targets
    
    Because SwiftBuild mode produces a linked executable for each test
    target.
    
    (cherry picked from commit 0a1f926)
    
    * BridgeJS: Skip type handle registration for unlinked modules
    
    `js test` generates the glue from every test target's skeletons, but the
    SwiftBuild build system links one binary per test target, so the eager
    registration hit a missing export.
    
    * PackageToJS: Share the linked JS modules with the aggregated glue
    
    The per-runner `bridge-js.js` copied to the base output directory for test
    preludes imports its JavaScript modules relative to itself, so copy the
    `bridge-js-modules` directory next to it.
    
    * BridgeJS: Require the imports object for static-only imported types
    
    An imported type looked up from `getImports` contributes its static methods
    too, but only a constructor marked the imports object as needed, so the glue
    referenced an undeclared `imports`.
    
    * PackageToJS: Generate each test bundle's glue from what its binary links in
    
    `js test` generated the glue from every test target's skeletons and handed
    the same copy to each SwiftBuild per-target runner, which described exports
    those binaries don't have. Package the aggregated glue once into the shared
    base directory, where preludes import it by a fixed path, and give each
    runner glue scoped to the target it links in.
    
    This supersedes the registration guard in the JS code generator.
    kateinoigakukun authored Aug 22, 2026
    Configuration menu
    Copy the full SHA
    cadafdc View commit details
    Browse the repository at this point in the history
Loading