Commit Graph

63 Commits

Author SHA1 Message Date
Max Desiatov cd7377fb49
Clarify `--environment` option for `carton test` in `README.md` (#333)
Resolves https://github.com/swiftwasm/carton/issues/322.
2022-05-11 14:40:15 +00:00
Max Desiatov fd11ff0140
Add `carton`/SwiftWasm/JSKit compat matrix to `README.md` (#332)
This should make it easier for people to use older versions if they'd like to.
2022-05-11 15:36:47 +01:00
Antonio Candinho 505a9b81a2
Add support for running tests using NodeJS (#328)
### 🎩 What is the goal?

Implement NodeJS as another test runner. 

### 📄 How is it being implemented?

In this PR, I include the following changes:

 - Create an abstraction for the different Test Runners (Wasmer, browser and now Node)
 - Implement the new Node test runner (quite similar to the Wasmer one)
 - Unify Javascript client code, so we can make sure we apply the same patches and load in the same way all the different targets
 - Create a new entry point for testing with node
 - Add that new entry point to the static bundle
 
### 👀 Any consideration?

The Node test runner does not use the TestsParser as it heavily impacts execution time. I will try to figure out what's going on later.
 
###  How can it be tested?

Testing is automated 🤖 . You can also check this in your own project by running:

```bash
carton test --environment node
```
2022-05-11 13:52:44 +00:00
Jed Fox 8790e10161
Update to v2 of Contributor Covenant in shared GitHub repo (#329) 2022-05-10 18:10:54 +00:00
Max Desiatov ee7b169df9
Describe `--debug-info` and `-Xswiftc` in `README.md` (#308)
New CLI options added in 0.13.0 weren't described in `README.md`, let's fix that.
2022-04-02 18:28:53 +01:00
Max Desiatov 74a49c1aa8
Use `async`/`await` and actors instead of Combine (#283)
This makes our codebase smaller by ~80 lines and arguably more readable. Also removes OpenCombine dependency.

* Use `async`/`await` and actors instead of Combine

* Remove OpenCombine dependency

* Fix progress animation not updated

* Stop building with Swift 5.4, clean up terminal output

* Update requirements in `README.md`

* Add `description` to `InvalidResponseCode`

* Fix Linux build error

* Rename `main.swift` to `Main.swift`

* Work around IR/TDB warnings

* Pass IR/TDB arguments correctly to `swift build`

* Support `async` process runner in `carton-release`

* Use Xcode 13.2.1 on macOS

* Pass TDB/IR flags to `swift test` as well

* Make `Install` command async

* Add doc comments, handle subsequent rebuilds
2022-01-17 09:04:44 +00:00
Max Desiatov 596730b005
Update dependencies, add support for SwiftWasm 5.5 (#263)
I've dropped support for Swift 5.2, and SwiftLint now requires Xcode 12.5.1, which is unavailable on macOS 10.15 with GitHub Actions. This makes it impossible to test with Swift 5.3 on CI, so I'm bumping the required version to Swift 5.4.

Resolves https://github.com/swiftwasm/carton/issues/262.

* Update dependencies, add support for SwiftWasm 5.5

* Bump dependencies in `.github/workflows/swift.yml`

* Add explicit dependency on `NIOFoundationCompat`

* Lower Splash version to 0.15 for Swift 5.3 compat

* Update DefaultToolchain.swift

* Update swift.yml

* Revert "Lower Splash version to 0.15 for Swift 5.3 compat"

This reverts commit 6e04a7f158.

* Require Swift 5.4 in `Package.swift`

* Update README.md

* Use older 5.5 snapshot, unblock tests on failure

* Update DefaultToolchain.swift

* Select correct CPU architecture when downloading

* Disable hanging test

* Use latest 5.5 toolchain

* Use 2021-11-16 snapshot of SwiftWasm 5.5

* Add missing linker flags, re-enable browser test

* Address PR feedback
2021-11-18 13:59:32 +01:00
Max Desiatov e2544afcb5 Clean up `README.md` 2021-09-01 20:51:50 +01:00
Max Desiatov 1c9502e833
Update link in `README.md` (#252)
Use direct OpenCombine link instead of relying on a redirect
2021-08-26 15:33:07 +01:00
Max Desiatov 10c21db4bf
Fix Ubuntu deps, clarify Linux support in README (#242)
Resolves #237.

* Fix Ubuntu deps, clarify Linux support in README

* Avoid using `sudo` if it's not installed
2021-05-28 22:00:38 +01:00
Max Desiatov 084dbf17a4
Link to the org sponsorship page from `README.md` (#210) 2021-01-09 20:15:19 +00:00
Max Desiatov 851bd8736c
Update the "Roadmap" section in `README.md` (#207)
Just a paragraph about browser testing removed. It is no longer relevant since this feature has been implemented.
2021-01-08 14:53:29 +00:00
Max Desiatov a7314cbb2e
Bump version to 0.9.0, update `CHANGELOG.md` 2020-12-04 13:05:55 +00:00
Max Desiatov 64e9c97ddc
Mark all commands as implemented in `README.md` (#180)
Also update the `carton test` section.
2020-12-04 11:41:20 +00:00
Max Desiatov 2f2b13ec6e
Bump version to 0.7.0, update `CHANGELOG.md` 2020-10-22 16:38:51 +01:00
Max Desiatov a889569373
Add Dockerfile, mention the Docker image in `README.md` (#136)
Resolves #119.

* Mention the Docker image in `README.md`

* Update .dockerignore

* Test Docker image building on CI

* Bring back the GitHub token to `swift.yml`
2020-10-22 10:58:16 +01:00
Max Desiatov 4635766c61
Fix support for Ubuntu 20.04, use GHA for SwiftLint (#134)
Resolves #114.

As support for SwiftLint in Danger seems a bit buggy (causing duplicate warning comments sometimes), this PR calls SwiftLint through a separate action that displays warnings only in the PR diff and hopefully in better way.

* Add support for Ubuntu 20.04

* Refine formatting

* Move SwiftLint to a separate GitHub Action

* Fix linker warnings

* Remove `danger.yml` and `Dangerfile.swift`

* Remove `--strict` argument from `swiftlint.yml`

* Update README.md
2020-10-21 14:27:50 +01:00
Max Desiatov 6c46eb02bd
Add @carson-katri and @kateinoigakukun to `FUNDING.yml` (#124)
* Add @carson-katri and @kateinoigakukun to `FUNDING.yml`

* Update README.md
2020-10-10 11:42:15 +01:00
yonihemi 0731ccb36f
Automatically open a browser window when Dev Server starts (#117)
* Automatically open dev server in system browser

* Allow opting out of automatically opening in browser

* Update readme with new behavior
2020-10-03 00:13:54 +08:00
Max Desiatov e76a97ece5
Mention `carton package` in README.md 2020-09-28 21:37:34 +01:00
Max Desiatov d11aca1989
Bump version to 0.6.0, update `CHANGELOG.md` 2020-09-28 21:30:26 +01:00
Max Desiatov ec698a677e
Specify Ubuntu 18.04 requirement in `README.md` 2020-09-28 20:17:35 +01:00
Max Desiatov 9c94fd02b1
Implement support for static resources in `carton dev` (#104)
This change requires `wasm-5.3-SNAPSHOT-2020-09-08-a` or later, therefore the default toolchain version has been bumped.

Implements the `carton dev` part of #38, `carton bundle` support will be implemented in a future PR.
2020-09-14 10:36:09 +01:00
Max Desiatov 53a1d46813
Implement `--custom-index-page` option (#101)
Allows passing a path to your custom `index.html` as `--custom-index-page` to `carton dev` and `carton bundle`. The entrypoint script is then injected into this file with a simple text substitution looking for a closing `</head>` tag. The assumption is that your custom `<body>` is not supposed to contain an unescaped `<head></head>`, and adding a dependency on a proper HTML parser to implement this injection is too costly.

Depends on #97.

Resolves #100.
2020-08-31 18:37:43 +01:00
Max Desiatov 5a5e7397eb
Implement `carton bundle` command (#97)
New `bundle.js` entrypoint is added, which only differs from `dev.js` in the lack of the WebSocket hot reloading bit.

`wabt` and `binaryen` Homebrew dependencies are added as required for `wasm-strip` and `wasm-opt` respectively that reduce the resulting bundle binary size.

All resulting bundle files except `index.html` are named by their content hashes to enable [cache busting](https://www.keycdn.com/support/what-is-cache-busting).

Resolves #16.
2020-08-31 16:29:47 +01:00
Max Desiatov 751a638841
Update `carton` build path on Linux in README.md 2020-08-26 21:30:15 +01:00
Max Desiatov 5b00355a08
Update `README.md` to reflect the current feature set (#90)
Xcode 12 warning is removed as 5.3 SwiftWasm snapshots that became the default are compatible with Xcode 12.

Closes #65.
Closes #81.
2020-08-20 11:35:58 +01:00
Max Desiatov c51f6176a0
Update default toolchain version (#87)
The latest 5.3 snapshot should be more stable and also supports specifying dependency on JavaScriptKit with a version range.
2020-08-18 18:02:34 +01:00
Max Desiatov 9e4c683fcb
Warn against Xcode 12 betas in `README.md` (#66)
This should somewhat alleviate the beta 3 issues reported here: https://github.com/swiftwasm/carton/issues/65
2020-07-24 11:29:06 +01:00
Max Desiatov 3d57f175f6
Remove outdated destination file documentation
Destination files are no longer needed for linking with Foundation.
2020-07-21 22:42:07 +01:00
Alex Tran Qui c07aad6fa2
Add a --release flag to the carton dev command (#19)
* Add a new option to the dev command to allow the passing of a destination.json file to the swift build command.

* Add missing link for destination.json spec

* adjust format

* Add a --release flag to the carton dev command

* fix typos

* remove extra line in README.md
2020-07-02 13:49:46 +01:00
Max Desiatov fe9bb37203
Clarify carton/swiftenv installations for destination.json 2020-07-02 12:04:08 +01:00
Alex Tran Qui 7fb12fd24d
Add --destination option to the `carton dev` command (#18)
- this add an optional flag to the `dev` command from `carton` to enable passing a `destination.json` file to the `swift build` call
- this requires that the toolchain referenced in the `destination.json` file is consistent with the one used by the `carton` process.
- it enables the importing of the `Foundation` module amongst others when running `carton dev`
2020-07-02 11:38:05 +01:00
Max Desiatov 8f26859497
Remove SDK installation from the "Roadmap" section 2020-06-26 21:47:30 +01:00
Max Desiatov 0143300d33
Refine "Motivation" section in README.md 2020-06-26 17:46:42 +01:00
Max Desiatov d9eec757f5
Update homebrew instructions in README.md 2020-06-26 15:53:46 +01:00
Max Desiatov c92dab84e7
Add version 0.2.0 to CHANGELOG.md
Resolve #3.
Close #9.
2020-06-26 15:40:55 +01:00
Max Desiatov 934fa831b1
Fix SwiftWasm book link in README.md 2020-06-23 13:56:13 +01:00
Trevör 247a568ee9
Update WASI link in README.md (#8)
Update with a correct link to WASI, for some browsers at least the current URL cannot be opened.
2020-06-21 20:35:42 +01:00
Max Desiatov e5b9e8657a
Clarify JavaScriptKit dependency in README.md 2020-06-21 10:59:03 +01:00
Max Desiatov 7b7643eeaa
Clarify "How does it work?" section in README.md 2020-06-20 20:04:14 +01:00
Max Desiatov b4da2ee593
Add "Motivation", "How does it work?" and "Roadmap" sections 2020-06-19 20:21:07 +01:00
Max Desiatov 8e50e18d8b
Link to the WASI website in README.md 2020-06-18 17:52:08 +01:00
Max Desiatov 85720963f6
Update README.md 2020-06-18 00:15:53 +01:00
Max Desiatov 0695689d3d
Implement basic test command 2020-06-13 22:51:53 +01:00
Max Desiatov 3a0c68ed88
Refine toolchain paragraph wording in README.md 2020-06-09 22:45:28 +01:00
Max Desiatov 9cc0eb4101
Mention that both SwiftWasm and host toolchain are required. 2020-06-09 22:44:25 +01:00
Max Desiatov 3502ebc1ab
Update README.md 2020-06-09 11:44:51 +01:00
Max Desiatov cef7387bd5
Refine macOS requirements in README.md 2020-06-09 11:33:19 +01:00
Max Desiatov 1bc667796b
Add requirements and installation instructions 2020-06-09 11:28:37 +01:00