Skip to content

Releases: swiftwasm/JavaScriptKit

0.24.0

17 Mar 11:16
1a33c51
Compare
Choose a tag to compare

PackageToJS Plugin: A New Packaging System

This release introduces PackageToJS, a new packaging system designed to replace carton. The new workflow simplifies package setup and improves build time.

Check Hello World example

Added APIs

  • WebWorkerDedicatedExecutor type is added to run actors on a dedicated web worker

Pull Requests

Full Changelog: 0.23.0...0.24.0

0.23.0

11 Mar 11:30
Compare
Choose a tag to compare

Breaking changes

  • Drop Swift 5.10 and earlier supports
  • JSValue no longer conforms Sendable nor Error
  • JSError no longer conforms Sendable nor Error

See #286 for rationale of removal of Sendable conformance from JSValue

Added APIs

  • JSException type is added to replace usage of Error conformance of JSValue
  • JSSending type is added to provide a way to safely transfer or clone JavaScript objects between threads

Quick example of JSSending

// Transfer an object to another thread
let buffer = JSObject.global.Uint8Array.function!.new(100).buffer.object!
let transferring = JSSending.transfer(buffer)

// Receive the object on a worker thread
let executor = try await WebWorkerTaskExecutor(numberOfThreads: 1)
Task(executorPreference: executor) {
    let receivedBuffer = try await transferring.receive()
    // Use the received buffer
}

// Clone an object for use in another thread
let object = JSObject.global.Object.function!.new()
object["test"] = "Hello, World!"
let cloning = JSSending(object)

Task(executorPreference: executor) {
    let receivedObject = try await cloning.receive()
    // Use the received object
}

Pull Requests

Full Changelog: 0.22.3...0.23.0

0.22.3

28 Feb 09:30
5148e4f
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.22.2...0.22.3

0.22.2

15 Dec 12:59
d4f24ae
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.22.1...0.22.2

0.22.1

28 Nov 10:26
02a4dda
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.22.0...0.22.1

0.22.0

28 Nov 08:10
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.21.0...0.22.0

0.21.0

15 Oct 04:50
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.20.2...0.21.0

0.20.2

09 Oct 15:46
9328d4b
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.20.1...0.20.2

0.20.1

11 Jul 07:40
Compare
Choose a tag to compare

Minor fixes for IDE build support

Full Changelog: 0.20.0...0.20.1

0.20.0

10 Jul 15:41
Compare
Choose a tag to compare

This release adds initial multi-threading support.

What's Changed

Full Changelog: 0.19.3...0.20.0