Releases: swiftwasm/JavaScriptKit
Releases · swiftwasm/JavaScriptKit
0.24.1
What's Changed
- PackageToJS: Emit hints for permission denied errors by @kateinoigakukun in #305
- Make
JSObject.idgetter inlinable by @kateinoigakukun in #306 - PackageToJS: Generalize
--verboseflag 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
WebWorkerDedicatedExecutortype 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-coverageby @kateinoigakukun in #299 - Add
-Xnodeoption 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-formatoption 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
JSValueno longer conformsSendablenorErrorJSErrorno longer conformsSendablenorError
See #286 for rationale of removal of Sendable conformance from JSValue
Added APIs
JSExceptiontype is added to replace usage ofErrorconformance ofJSValueJSSendingtype 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
WebWorkerTaskExecutoreven 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
JSObjectis 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
0.20.2
What's Changed
- Update macro conditions for runtime usage by @fjtrujy in #257
- Soft-fail integer conversion from JS values that are not representable by @kateinoigakukun in #259
- Fix some typos by @Sajjon in #260
- Use
compiler(>=6.1)to gate for the main branch toolchain by @kateinoigakukun in #261
New Contributors
Full Changelog: 0.20.1...0.20.2
0.20.1
Minor fixes for IDE build support
Full Changelog: 0.20.0...0.20.1