# Deprecating \`swiftwasm/carton\` in favor of JavaScriptKit's SwiftPM Plugin

**URL:** <https://forums.swift.org/t/deprecating-swiftwasm-carton-in-favor-of-javascriptkits-swiftpm-plugin/83460>\
**Category:** Swift for WebAssembly\
**Created:** [November 29, 2025, 11:52am UTC](https://forums.swift.org/t/deprecating-swiftwasm-carton-in-favor-of-javascriptkits-swiftpm-plugin/83460 "2025-11-29T11:52:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kateinoigakukun](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/kateinoigakukun/32/16706_2.png) [@kateinoigakukun](https://forums.swift.org/u/kateinoigakukun)\
**Post date:** [November 29, 2025, 11:52am UTC](https://forums.swift.org/t/deprecating-swiftwasm-carton-in-favor-of-javascriptkits-swiftpm-plugin/83460/1 "2025-11-29T11:52:46Z")

</div>

Hi everyone,

With the recent improvements in the SwiftPM Plugin for JavaScriptKit, I think it's time to formally deprecate **[`swiftwasm/carton`](https://github.com/swiftwasm/carton)**.

### What carton has historically provided

When we first introduced `carton`, it covered several gaps that existed in the SwiftWasm ecosystem:

- installing the SwiftWasm toolchain,
- a file-watching rebuild loop to speed up feedback iteration,
- packaging SwiftPM build products for the web (JS loader, HTML stub, etc.),
- and a simple test runner for Wasm.

These were all important at a time when SwiftWasm toolchain lived outside the main Swift project.

### Why it's no longer needed

Since then, the situation has changed quite a lot.

**SwiftWasm compiler is now fully upstream** , and ongoing WebAssembly-related work happens directly in Swift itself. There is no longer a separate toolchain package that needs a dedicated installer; tools like _swiftly_ can install official Swift toolchains, and `swift sdk` command can install Swift SDK for WebAssembly.  
The official documentation covers this workflow well:

> **[Swift.org](https://www.swift.org/documentation/articles/wasm-getting-started.html)**
>
> Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.

Editor support has also improved. Thanks to [proper Swift SDK support in sourcekit-lsp](https://github.com/swiftlang/swift-org-website/blob/6d958f546485bb8099cf8d2eb66890c13a456432/documentation/articles/wasm-getting-started.md#editor-configuration), cross-compiling to WebAssembly now provides accurate diagnostics directly in the editor. This reduces the need for a build tool to perform full rebuilds just to surface errors. The old auto-rebuild loop was helpful when editor feedback was limited, but its role has largely been replaced by better language server support.

Regarding packaging and testing, the new **`swift package js`** SwiftPM Plugin in JavaScriptKit essentially replaces carton's packaging and test-running workflow. You can try it with:

```swift
swift package --swift-sdk <SDK_ID> js

```

For documentation, the following pages cover the new setup:

- [https://swiftpackageindex.com/swiftwasm/javascriptkit/main/tutorials/javascriptkit/hello-world](https://swiftpackageindex.com/swiftwasm/javascriptkit/main/tutorials/javascriptkit/hello-world)
- [https://swiftpackageindex.com/swiftwasm/JavaScriptKit/main/documentation/javascriptkit](https://swiftpackageindex.com/swiftwasm/JavaScriptKit/main/documentation/javascriptkit)

### Going forward

Given all of this, the `swiftwasm/carton` repository has now been archived and won't receive new features. The SwiftPM plugin approach provides a more straightforward and future-proof way to support WebAssembly development.

Thanks to everyone who used carton or contributed to it over the years. It helped bridge an early gap, and I'm glad the ecosystem has reached a point where most of this can now be handled by Swift's standard tooling more.

Happy to discuss any migration issues or missing pieces.

Yuta
