Commit Graph

54 Commits

Author SHA1 Message Date
omochimetaru 6cc68d3ba8
Show stdout/stderr from Wasm in terminal (#472) 2024-05-25 09:06:24 +09:00
omochimetaru 3cb3877d98
Send stdout/stderr from WasmRunner to dev server without decoding as UTF-8 (#471)
* Enable WasmRunner to handle stdout as raw binary

* catch other errors

* move devDeps

* use browser exception handling

* comment out
2024-05-25 01:33:13 +09:00
Yuta Saito 026796b47d Make carton npm package private
We don't want to publish the package and set the version to 0.0.0 to
avoid version-bumping operations.
2024-05-22 11:56:06 +09: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
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
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
Max Desiatov 846a05dc89
Update JS dependencies in `package-lock.json` (#231) 2021-04-27 14:39:02 +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
thecb4 22165481bf
Add tests for `dev` and `bundle` commands (#196)
* carton dev and bundle default command tests

* removed tests_output

* removed .testfile

* carton dev and bundle default command tests

* removed localhost as localURL

* attempt to fix folder name issue

* removed Fixtures test folder

* added Fixtures test folder

* attempt to fix folder name issue

* attempt to fix server connect issue

* fixed dev testWithNoArguments with sleep delay

* Debugging bundle command for github actions

* Install wasmr prior to swift test

* Debug clean up

* Debug clean up

* Update Tests/CartonCommandTests/CommandTestHelper.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

Co-authored-by: thecb4 <cavelle@tehcb4.io>
Co-authored-by: Max Desiatov <max@desiatov.com>
2020-12-28 13:13:27 -05:00
Max Desiatov b47058f446
Bump version to 0.9.1, update `CHANGELOG.md` 2020-12-19 15:30:25 +00:00
dependabot[bot] 3015e7e4dc
Bump ini from 1.3.5 to 1.3.8 (#187)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-12 21:40:44 +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 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
dependabot[bot] 62a81df21e
Bump bl from 4.0.2 to 4.0.3 (#102)
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-02 21:35:54 +01:00
Max Desiatov 749a17d730
Update static.zip, automate its release process (#60)
`dev.js` entrypoint has been updated to include the recent JavaScriptKit runtime fix: https://github.com/swiftwasm/JavaScriptKit/pull/19

I've also added a new subcommand to `carton-release`, which is now able to automaticallly create a new `static.zip` and record updated hashes in the source code. It still doesn't upload the archive automatically to previous release assets, but I wonder if that should be done manually anyway, at least until we have some kind of tests that verify the whole process end-to-end.

Additionally, since the new runtime is not compatible with the old Swift parts of JavaScriptKit, `carton dev` now checks the revision of JavaScriptKit that projects have specified in their `Package.swift`. It doesn't block the build process, but I hope it gives enough warning about the incompatibility.
2020-07-19 21:53:04 +01:00
Carson Katri f27a65bf64
Upgrade JavaScriptKit (#59) 2020-07-18 12:42:38 -04:00