|
| 1 | +--- |
| 2 | +date: 2022-05-02 10:10 |
| 3 | +description: SwiftWasm 5.6.0 has been released. |
| 4 | +--- |
| 5 | + |
| 6 | +# SwiftWasm 5.6.0 is now available |
| 7 | + |
| 8 | +We're happy to announce the new release of SwiftWasm tracking upstream Swift 5.6! |
| 9 | + |
| 10 | +Notable WebAssembly-specific changes in this release: |
| 11 | + |
| 12 | +- The toolchain is now available for Ubuntu 20.04 on `aarch64` and Amazon Linux 2 on `x86_64` architectures. |
| 13 | +- Updated WASI SDK with support for ["reactor" and "command" execution |
| 14 | + models](https://github.com/WebAssembly/WASI/issues/13). You should be using "reactor" model for event-based (browser) |
| 15 | + applications, while "command" mode is suitable for command-line applications. |
| 16 | + |
| 17 | +With 5.6 release, when building SwiftWasm apps manually with `swift build`, you should |
| 18 | +pass `-Xswiftc -Xclang-linker -Xswiftc -mexec-model=reactor` flags to enable the "reactor" mode. When building with `carton`, |
| 19 | +"reactor" model is enabled automatically. |
| 20 | + |
| 21 | +As for changes in upstream Swift 5.6, we recommend referring [to the official |
| 22 | +changelog](https://github.com/apple/swift/blob/release/5.6/CHANGELOG.md#swift-56). For convenience, here are some of the Swift |
| 23 | +Evolution proposals included in the release: |
| 24 | + |
| 25 | +- [SE-0290](https://github.com/apple/swift-evolution/blob/main/proposals/0290-negative-availability.md) - Unavailability Condition |
| 26 | +- [SE-0305](https://github.com/apple/swift-evolution/blob/main/proposals/0305-swiftpm-binary-target-improvements.md) - Package Manager Binary Target Improvements |
| 27 | +- [SE-0315](https://github.com/apple/swift-evolution/blob/main/proposals/0315-placeholder-types.md) - Type placeholders (formerly, “Placeholder types”) |
| 28 | +- [SE-0320](https://github.com/apple/swift-evolution/blob/main/proposals/0320-codingkeyrepresentable.md) - Allow coding of non `String`/`Int` keyed `Dictionary` into a `KeyedContainer` |
| 29 | +- [SE-0322](https://github.com/apple/swift-evolution/blob/main/proposals/0322-temporary-buffers.md) - Temporary uninitialized buffers |
| 30 | +- [SE-0324](https://github.com/apple/swift-evolution/blob/main/proposals/0324-c-lang-pointer-arg-conversion.md) - Relax diagnostics for pointer arguments to C functions |
| 31 | +- [SE-0325](https://github.com/apple/swift-evolution/blob/main/proposals/0325-swiftpm-additional-plugin-apis.md) - Additional Package Plugin APIs |
| 32 | +- [SE-0331](https://github.com/apple/swift-evolution/blob/main/proposals/0331-remove-sendable-from-unsafepointer.md) - Remove `Sendable` conformance from unsafe pointer types |
| 33 | +- [SE-0332](https://github.com/apple/swift-evolution/blob/main/proposals/0332-swiftpm-command-plugins.md) - Package Manager Command Plugins |
| 34 | +- [SE-0335](https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md) - Introduces existential `any` |
| 35 | +- [SE-0337](https://github.com/apple/swift-evolution/blob/main/proposals/0337-support-incremental-migration-to-concurrency-checking.md) - Incremental migration to concurrency checking |
| 36 | + |
| 37 | +## New JavaScriptKit runtime |
| 38 | + |
| 39 | +[JavaScriptKit](https://github.com/swiftwasm/JavaScriptKit) 0.14 is a breaking release that enables full support for SwiftWasm 5.6 and lays groundwork for [future |
| 40 | +updates](https://github.com/swiftwasm/DOMKit/pull/10) to [DOMKit](https://github.com/swiftwasm/DOMKit/). |
| 41 | + |
| 42 | +Specifically, the `ConvertibleToJSValue` conformance on `Array` and `Dictionary` has been swapped from the |
| 43 | +equality `== ConvertibleToJSValue` clause to the inheritance `: ConvertibleToJSValue` clause. |
| 44 | + |
| 45 | +- This means that e.g. `[String]` is now `ConvertibleToJSValue`, but `[ConvertibleToJSValue]` no longer conforms. |
| 46 | +- the `jsValue()` method still works in both cases. |
| 47 | +- to adapt existing code, use one of these approaches: |
| 48 | + - use generics where possible (for single-type arrays) |
| 49 | + - call `.map { $0.jsValue() }` (or `mapValues`) to get an array/dictionary of `JSValue` which you can then use as |
| 50 | + `ConvertibleToJSValue` |
| 51 | + - add `.jsValue` to the end of all values in an array/dictionary literal. |
| 52 | + |
| 53 | +## carton |
| 54 | + |
| 55 | +The 0.14 release of [`carton`](https://carton.dev) uses SwiftWasm 5.6.0 as the default toolchain. Additionally, issue with rebuilding projects |
| 56 | +when watching for file changes with `carton dev` has been fixed. Also, please refer to [release details for `carton` |
| 57 | +0.13.0](https://github.com/swiftwasm/carton/releases/tag/0.13.0) for more information on new recently |
| 58 | +introduced `--debug-info` and `-Xswiftc` command-line flags. |
| 59 | + |
| 60 | +## Tokamak |
| 61 | + |
| 62 | +[Tokamak](https://tokamak.dev) 0.10.0 adds support for SwiftWasm 5.6. It also updates JavaScriptKit and OpenCombineJS |
| 63 | +dependencies. Due to issues with support for older SwiftWasm releases in the carton/SwiftPM integration, Tokamak now |
| 64 | +requires SwiftWasm 5.6 or later, while SwiftWasm 5.4 and 5.5 are no longer supported. |
| 65 | + |
| 66 | +## OpenCollective Budget |
| 67 | + |
| 68 | +As may already know, [our OpenCollective page](https://opencollective.com/swiftwasm) is the main way to financially |
| 69 | +support us. We're committed to publishing transparent and open finances, so we are excited to announce that all |
| 70 | +expenses and transactions can be viewed publicly on our [OpenCollective |
| 71 | +Transactions](https://opencollective.com/swiftwasm/transactions) page. |
| 72 | + |
| 73 | +So far we've spent money on monthly CI bills that cover new `aarch64` CPU architecture and Linux distributions, |
| 74 | +domain registration, email hosting, and development hardware for our maintainers. |
| 75 | + |
| 76 | +## Acknowledgements |
| 77 | + |
| 78 | +We'd like to thank [our GitHub sponsors](https://github.com/sponsors/swiftwasm) and [OpenCollective |
| 79 | +contributors](https://opencollective.com/swiftwasm) for their support, which allowed us to continue working on SwiftWasm |
| 80 | +and related projects. |
| 81 | + |
| 82 | +Many thanks to [MacStadium](https://www.macstadium.com) for giving us access to Apple Silicon hardware. |
| 83 | +Without their help it would be close to impossible to set up CI for enabling full M1 support in our toolchain. |
| 84 | + |
| 85 | +Additionally, we'd like to thank everyone who contributed their work and helped us make this release |
| 86 | +happen. These new releases wouldn't be possible without the hard work of (in alphabetical order): |
| 87 | + |
| 88 | +- [@andrewbarba](https://github.com/andrewbarba) |
| 89 | +- [@carson-katri](https://github.com/carson-katri) |
| 90 | +- [@ezraberch](https://github.com/ezraberch) |
| 91 | +- [@fjtrujy](https://github.com/fjtrujy) |
| 92 | +- [@j-f1](https://github.com/j-f1) |
| 93 | +- [@kateinoigakukun](https://github.com/kateinoigakukun) |
| 94 | +- [@MaxDesiatov](https://github.com/MaxDesiatov) |
| 95 | +- [@pedrovgs](https://github.com/pedrovgs) |
| 96 | +- [@SDGGiesbrecht](https://github.com/SDGGiesbrecht) |
| 97 | +- [@SwiftCoderJoe](https://github.com/SwiftCoderJoe) |
| 98 | +- [@yonihemi](https://github.com/yonihemi/) |
| 99 | + |
| 100 | +...and to all of our users, and everyone working on the Swift project and libraries we depend on! |
0 commit comments