Closed mergesort closed 2 months ago
I guess you are using non-Wasm Swift toolchain. Could you check PATH
is configured to use SwiftWasm toolchain as instructed here?
If you properly configured it, you will see SwiftWasm
in the version message.
$ swiftc --version
SwiftWasm Swift version 5.9.2 (swift-5.9.2-RELEASE)
My apologies for missing your reply to this issue. When I install the latest toolchain and run env TOOLCHAINS=swiftwasm swift
, I get this error message.
error: failed to launch REPL process: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
As a result the toolchain continues to be this.
swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
@mergesort The REPL mode (just a swift
command) doesn't work in this version, unfortunately. I recommend to use PATH
modification way instead of TOOLCHAINS
env var.
Got it, that worked great. Thank you so much @kateinoigakukun, will close the issue now that I understand the right way to get started!
I'm looking to take a Swift SDK that I've built and integrate it in a browser extension, to share logic for the API calls I've already built for a Swift/Vapor app. I'm very new to JavaScriptKit but have a lot of Swift experience and know enough TypeScript to code myself into a problem.
With that in mind, I put together a project that integrates my Swift SDK, for the purposes of giving it a test run to see if my proof of concept would work. I wasn't able to get very far though, after I had a Swift package built that integrated a few local dependencies and JavaScriptKit I tried to run
swift build --triple wasm32-unknown-wasi
in my package, and ran into this error.I can't yet share all of the code I plan to publish but am happy to share any more information I can that may be helpful, so please let me know if there's anything else I can provide to help debug.
Thank you so much!