Revert "Use `--static-swift-stdlib` for easier distribution on Linux (#343)"
This reverts commit 78d023587c.
As reported previously:
> after adding --static-swift-stdlib, carton init and other commands started hanging.
> It seems something wrong in Foundation or global executor. The min repro for the hang is here
> https://gist.github.com/kateinoigakukun/a3ee55fa2480a46959211c53de862131
* Add WebDriverClient for headless testing
* Launch new session with headless arg by default
* Add --headless option in carton test
* Improve logging message
* Apply formatter for WebDriverClient module
* Support MS Edge
* Add headless testing test
* Explicitly depend on NIOFoundationCompat
* Avoid public actor field as a 5.5 compiler crash workaround
* Add --headless description in README.md
* Update Sources/CartonCLI/Commands/Test.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
* Apply suggestions from code review for wording
Co-authored-by: Max Desiatov <max@desiatov.com>
* Rename failedToFindDriver -> failedToFindWebDriver
* Rephrase diagnostic message
* Omit explicit internal keyword
* Remove unused goto.Response struct
* Add license header to Tests/WebDriverClientTests/WebDriverClientTests.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: Max Desiatov <max@desiatov.com>
I am trying to implement an `esbuild` plugin that calls into `carton`. My plan was to call `carton bundle --debug` to get a quick development build and then extract that command's output for use in our esbuild project.
Unfortunately, `carton bundle` still runs `wasm-opt` even on a debug build, which takes 5-10s for our project. The only alternative I can see is `carton dev`, but that runs the dev server / watcher, which we don't want either for a one-off build.
Since changing the behaviour of `carton bundle --debug` to _not_ run `wasm-opt` may cause issues with backwards compatibility, @MaxDesiatov suggested we add a command line option `--wasm-optimizations {size, none}` instead, allowing users to specifically opt out of this behaviour.
In theory, this should allow us to distribute self-contained binaries on Linux. These wouldn't be statically linked completely, but at least they should no longer depend on a separate dynamic library file with Swift stdlib.
Related to https://github.com/swiftwasm/carton/issues/336.
* Add --skip-build option to carton test to delegate building to users
* Add test case for --skip-build
* Rename --skip-build to --bundle-path to allow specifying binary path
* Update Sources/CartonCLI/Commands/Test.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
* Rename --bundle-path to --prebuilt-test-bundle-path
* Update Sources/CartonCLI/Commands/Test.swift
Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: Max Desiatov <max@desiatov.com>