Commit Graph

52 Commits

Author SHA1 Message Date
Yuta Saito 85fa55e4f9 Bump version to 1.0.3, update CHANGELOG.md 2024-04-18 00:50:11 +00:00
Yuta Saito 688e8fe200 Use `@bjorn3/browser_wasi_shim` as WASI implementation 2024-04-18 09:45:55 +09:00
omochimetaru 3abdbd2386 migrate to TypeScript 2024-04-18 01:31:11 +09:00
Yuta Saito f286203b0d Fix test harness for the latest main XCTest
The latest XCTest bundled in Swift SDK for Wasm requires `Bundle.main` access to
minimize behavior difference from other platforms. `Bundle.main`
requires `argv[0]` and file system access to get the main bundle path.
2024-04-05 03:24:37 +09:00
Yuta Saito 2467a0c908 Bump version to 1.0.2, update CHANGELOG.md 2024-03-28 12:33:04 +09:00
Yuta Saito b0a4ae7fad Bump version to 1.0.1, update CHANGELOG.md 2024-03-10 18:25:34 +09:00
Yuta Saito 9b8ba12741 Bump version to 1.0.0, update CHANGELOG.md 2024-03-09 14:37:30 +00:00
Yuta Saito 33ef59df6f Bump version to 0.20.1, update CHANGELOG.md 2024-01-25 14:35:53 +00:00
furby™ 504e2d91e3
Swift 5.9 support (#402) 2023-09-30 06:59:29 -04:00
Yuta Saito d2864bee74 Bump version to 0.19.0, update `CHANGELOG.md` 2023-05-08 12:39:36 +00:00
Yuta Saito f2a83a28bb Bump version to 0.18.0, update `CHANGELOG.md` 2023-04-03 12:01:20 +00:00
Yuta Saito 3a00a0d79b Bump version to 0.17.0, update `CHANGELOG.md` 2022-09-30 14:17:39 +00:00
Yuta Saito 9c0abbf013 Bump version to 0.16.1, update `CHANGELOG.md` 2022-07-22 14:21:51 +00:00
Yuta Saito 29a9b587b2 Bump version to 0.16.0, update `CHANGELOG.md` 2022-06-15 23:03:41 +09:00
Yuta Saito 25da29b475 Bump version to 0.15.3, update `CHANGELOG.md` 2022-05-25 00:17:25 +09:00
Max Desiatov 8b44aa18b5 Bump version to 0.15.2, update `CHANGELOG.md` 2022-05-23 16:07:28 +01:00
Max Desiatov 4314a92adc Bump version to 0.15.1, update `CHANGELOG.md` 2022-05-23 10:47:13 +01:00
Max Desiatov 683e3e0759
Bump version to 0.15.0, update `CHANGELOG.md` (#348) 2022-05-20 15:27:53 +01:00
Max Desiatov 1ba7dd5d82
Use JSKit runtime from SwiftPM resources (#335)
* Use JSKit runtime from SwiftPM resources

* Fix Node.js test runner

* Remove unused webpack npm packages

* Update Swift version in `.swiftformat`

* Fix browser and Node.js CJS/ESM handling

* Fix one of the tests, add CI time limit

* Use Tokamak `update-jskit` branch to fix tests

* Use latest Vapor with `.mjs` content-type fix

* Use dynamic import to detect JSKit presence

* Fix missing `runtimeConstructor` reference

* Update `StaticArchive.swift`

* Reduce the diff

* Address PR feedback

* Fix Node.js <-> JSKit integration test

* Update SwiftPM dependencies

* Fix comment typo in `testNode.js`

* Reuse `__stack_sanitizer` across entrypoints
2022-05-20 13:12:45 +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
Max Desiatov d7c4ebe693 Bump version to 0.14.2, update `CHANGELOG.md` 2022-04-30 11:17:53 +01:00
Max Desiatov 8a73ca9a87
Bump version to 0.14.1 and update `CHANGELOG.md` (#316) 2022-04-12 12:57:14 +01:00
Max Desiatov a03da05ee2
Bump version to 0.14.0, update `CHANGELOG.md` (#311) 2022-04-10 13:39:29 +09:00
Yuta Saito 9c4021d262
Several fixes for 5.6 toolchain (#310)
- Reactor model support
- Update sanitizer support object

This is required to resolve https://github.com/TokamakUI/Tokamak/pull/475
2022-04-09 13:37:34 +00:00
Max Desiatov 409c78dd14
Bump version to 0.13.0, update `CHANGELOG.md` (#305)
Ideally we'd like to include new JSKit and SwiftWasm releases, but I think it makes more sense to wait for new JSKit release a bit more and to test things more thoroughly. Also, the watcher bug is still not fixed.

On the other hand, `--debug-info` has been highly requested by our users, so nothing prevents us from releasing 0.13.0 right now, and 0.14.0 with new JSKit/Tokamak and SwiftWasm 5.6 later.
2022-04-01 10:49:05 +01:00
Max Desiatov a15023d881
Bump JavaScriptKit dependency to 0.13.0 (#306) 2022-04-01 08:53:53 +01:00
yonihemi 7bd54d6c0c
Bump JavaScriptKit and Tokamak (#294) 2022-02-16 11:02:53 +00:00
Max Desiatov b3b060d625
Bump version to 0.12.1, update `CHANGELOG.md` (#271) 2021-12-01 15:09:41 +01:00
Max Desiatov 0e163ec9aa
Use SwiftWasm 5.5.0, bump version to 0.12.0 (#266)
`async-http-client` package is now pinned to 1.6.4, as 1.7.0 and later versions caused issues with toolchain downloads (see https://github.com/swift-server/async-http-client/issues/488 for more details).

I've also updated toolchain downloader code to bubble up download errors, which previously were hidden and made it very hard to diagnose these issues.

* Use SwiftWasm 5.5.0, bump version to 0.12.0

* Pin AHC to 1.8.0

* Pin AHC to 1.6.4, always remove downloaded archives

* Fix `defer` build issue
2021-11-24 17:14:42 +01:00
yonihemi 4514347a25
Update JavaScriptKit to v0.11.1 (#265)
* Update JavaScriptKit to v0.11.1

* Update static.zip URL
2021-11-23 17:02:41 +08:00
Max Desiatov dd6439700f
Bump version to 0.11.0, update dependencies (#251)
* Bump version to 0.11.0, update dependencies

* Test on Big Sur with Xcode 12.5

* Update test fixture dependencies

* Remove `LinuxMain.swift` expectations

* Test with `wasm-5.4-SNAPSHOT-2021-08-26-a`

* Remove expectations for `XCTestManifests.swift`

* Enable debugging output

* Try the latest 5.4 toolchain

* print debug output

* More debug output

* Test on macOS 11 with Xcode 13

* Pipe errors to stdout

* Update DefaultToolchain.swift

* Revert "Update DefaultToolchain.swift"

This reverts commit 4ff15f938a.

* Remove Xcode 13 from the CI matrix

* Update DefaultToolchain.swift

* Reduce the diff
2021-09-01 15:07:00 +01:00
Max Desiatov ed06b25ab0
Bump version to 0.10.0, update `CHANGELOG.md` (#244) 2021-05-30 10:37:08 +01:00
Yuta Saito 1acf9c3ad7
Integrate stack sanitizer (#230)
* Update WasmTransformer

* Add build flavor to determine build options

* Enable stack overflow sanitizer pass

* Embed import entry in binary

* Remove sanitize support from bundle command

* Update WasmTransformer and add --stack-first option

* Fix carton-release hash-archive for CartonKit renaming

* Run carton-release hash-archive

* Update WasmTransformer

* Use run-p

* Use matrix in CI

* Build and install pre-released resource

* Exclude fixture directory from linting

* Fix failing tests

* Turn off sanitizer on test command
2021-04-18 16:45:10 +09:00
Max Desiatov b47058f446
Bump version to 0.9.1, update `CHANGELOG.md` 2020-12-19 15:30:25 +00:00
Max Desiatov a7314cbb2e
Bump version to 0.9.0, update `CHANGELOG.md` 2020-12-04 13:05:55 +00:00
Max Desiatov 1c15282114
Bump JSKit, add support for testing in browsers (#173)
Resolves https://github.com/swiftwasm/carton/issues/42.

Also updates JavaScriptKit dependency to 0.9.0.

* Demangle and print Firefox stacktraces in terminal

* Update the entrypoints archive URL, rename file

* Add missing newline to `ProcessRunner.swift`

* Remove redundant `console.log` call from `dev.js`

* Detect destination env from `User-Agent` header

* Silence linter in tests where it can't be avoided

* Add support for basic testing in browsers

* Add a browser message on finish, shut down server

* Update JavaScriptKit to 0.9.0
2020-12-01 11:04:37 +00:00
Max Desiatov e62b6adcf7
Bump version to 0.8.1, update `CHANGELOG.md` (#163) 2020-11-09 11:01:52 +00:00
Max Desiatov 59bc8271d4
Bump version to 0.8.0, update `CHANGELOG.md` (#158)
* Bump version to 0.8.0, update `CHANGELOG.md`

* Fix subsection title formatting in CHANGELOG.md
2020-11-08 09:29:24 +09:00
Max Desiatov 566e3419e2
Bump JavaScriptKit to 0.8, stop checking revision (#139)
Other than a simple bump, we shouldn't check for the revision anymore. Now the recommended way to specify this dependency is only with a semantic version constraint.
2020-10-22 15:49:45 +01:00
Max Desiatov 6c1a12df6c
Bump version to 0.6.1, update `CHANGELOG.md` 2020-09-29 11:41:50 +01:00
Max Desiatov d11aca1989
Bump version to 0.6.0, update `CHANGELOG.md` 2020-09-28 21:30:26 +01:00
Max Desiatov cd660a8d86
Use raw stdout if TerminalController is unavailable (#113)
TTY terminal output is unavailable on CI, or when users redirect output to a file or a pipe. In those cases `TerminalController` initializer returns `nil`. SwiftPM has a wrapper `InteractiveWriter` class for it, which writes output to stdout directly in that case. I've copied that, and replaced all uses of `TerminalController` with it. A VSCode task is added to test that.

In my testing it looks like download progress reporting is quite spammy, so it now has `removeDuplicates` Combine operator added to make it output only when values differ significantly from each other.

Additionally, SDK installs can hit GitHub API rate limit on CI nodes, so `carton` now reads `GITHUB_TOKEN` environment variable, which gives much higher limits to authenticated API users.

We can now also run various `carton` commands on CI for basic end-to-end testing.

Resolves #112.
2020-09-28 20:14:18 +01:00
Max Desiatov c75f6c98d7
Bump JavaScriptKit to 0.7.2 (#115) 2020-09-28 16:47:59 +01:00
Max Desiatov b2aa6fd62c
Update node.js dependencies, including wasmer.js (#108)
Resolves #25
2020-09-16 21:07:05 +01:00
Max Desiatov 3478fb082e
Bump JavaScriptKit dependency to 0.6.0 (#107)
Handling of the `static.zip` archive has changed slightly, where now the archive no longer has a nested `static` directory in it, which makes packaging slightly more predictable. For some reason passing wildcards to `zip` no longer works for me.
2020-09-14 12:36:06 +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
Carson Katri f27a65bf64
Upgrade JavaScriptKit (#59) 2020-07-18 12:42:38 -04:00
Max Desiatov 5b325a6a9f
Update WASI polyfill, print a backtrace on crash (#27)
Related to https://github.com/swiftwasm/carton/issues/26.
2020-07-06 23:03:15 +01:00
Max Desiatov 7b364b898f
Update dev bundle to the latest JavaScriptKit 2020-06-21 11:11:06 +01:00
Max Desiatov 2c66bdb72e
Use ReconnectingWebSocket in the dev.js polyfill 2020-06-08 21:49:43 +01:00