Releases: swiftwasm/JavaScriptKit
Releases · swiftwasm/JavaScriptKit
0.25.1
What's Changed
- Add
JSTypedArray.copyMemory(to:)
method by @kateinoigakukun in #315 - PackageToJS: Inherit
swift package -c
configuration by default by @kateinoigakukun in #316
Full Changelog: 0.25.0...0.25.1
0.25.0
What's Changed
- Add .swift-format configuration and add a script to format by @kateinoigakukun in #308
- Add
--configuration
option toswift package js
command by @kateinoigakukun in #309 - Update all npm dependencies by @kateinoigakukun in #310
- PackageToJS: Package TypeScript type definitions for runtime by @kateinoigakukun in #311
- Add
JSTypedArray.init(buffer:)
initializer by @kateinoigakukun in #314
Full Changelog: 0.24.1...0.25.0
0.24.1
What's Changed
- PackageToJS: Emit hints for permission denied errors by @kateinoigakukun in #305
- Make
JSObject.id
getter inlinable by @kateinoigakukun in #306 - PackageToJS: Generalize
--verbose
flag to all commands by @kateinoigakukun in #307
Full Changelog: 0.24.0...0.24.1
0.24.0
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
- Workaround Swift 6.0 compiler crash by @kateinoigakukun in #293
- Packaging Plugin by @kateinoigakukun in #288
- Add Hello world tutorial by @kateinoigakukun in #294
- Remove custom test framework by @kateinoigakukun in #295
- PackageToJS: Fix the missing dependency on the stripWasm task by @kateinoigakukun in #296
- Add WebWorkerDedicatedExecutor to run actors on a dedicated web worker by @kateinoigakukun in #297
- Setup unit test infrastructure for PackageToJS by @kateinoigakukun in #298
- Add
--enable-code-coverage
by @kateinoigakukun in #299 - Add
-Xnode
option to pass extra arguments to node by @kateinoigakukun in #300 - PackageToJS: Bring XCTest output formatter from carton by @kateinoigakukun in #301
- PackageToJS: Add
--debug-info-format
option by @kateinoigakukun in #302 - PackageToJS: Use the actual wasm filename in the final product by @kateinoigakukun in #303
Full Changelog: 0.23.0...0.24.0
0.23.0
Breaking changes
- Drop Swift 5.10 and earlier supports
JSValue
no longer conformsSendable
norError
JSError
no longer conformsSendable
norError
See #286 for rationale of removal of Sendable conformance from JSValue
Added APIs
JSException
type is added to replace usage ofError
conformance ofJSValue
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
- Swift 6 language mode compatibility by @kateinoigakukun in #286
- Concurrency: Fix build for p1-threads target by @kateinoigakukun in #287
- Add a mechanism to "Transfer" JSObject between Workers by @kateinoigakukun in #292
Full Changelog: 0.22.3...0.23.0
0.22.3
What's Changed
- Add WASI SDK checksum to CONTRIBUTING.md by @ole in #280
- Support JS function calls with up to 7 arguments in Embedded Swift by @ole in #281
- Update readme by @sakrist in #283
- CI: Use Swift SDK by default by @kateinoigakukun in #285
New Contributors
Full Changelog: 0.22.2...0.22.3
0.22.2
What's Changed
- Expose
WebWorkerTaskExecutor
even if compiling with toolchain < 6.1 by @kateinoigakukun in #277 - Fix empty TypedArray creation by @kateinoigakukun in #278
Full Changelog: 0.22.1...0.22.2
0.22.1
What's Changed
- Stop use of global variable as a object cache by @kateinoigakukun in #274
Full Changelog: 0.22.0...0.22.1
0.22.0
What's Changed
- improved embedded support for building with SwiftPM by @sliemeobn in #267
- Add Swift 6.0 to CI matrix by @kateinoigakukun in #268
- Assert that
JSObject
is being accessed only from the owner thread by @kateinoigakukun in #273
Full Changelog: 0.21.0...0.22.0
0.21.0
What's Changed
- Support for Embedded Swift (v2) by @sliemeobn in #263
- Follow-up adjustment for Embedded support by @kateinoigakukun in #265
- Resolve warnings by @kateinoigakukun in #266
New Contributors
- @sliemeobn made their first contribution in #263
Full Changelog: 0.20.2...0.21.0