Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm32-wasip1-threads #55

Draft
wants to merge 2 commits into
base: wasm32-wasi
Choose a base branch
from
Draft

wasm32-wasip1-threads #55

wants to merge 2 commits into from

Conversation

kkebo
Copy link
Owner

@kkebo kkebo commented Jun 8, 2024

No description provided.

@kkebo kkebo self-assigned this Jun 8, 2024
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from b4ccc5d to 2e8cdfa Compare June 9, 2024 04:29
@kkebo
Copy link
Owner Author

kkebo commented Jun 9, 2024

a-Shell cannot run this executable.

$ swift-format-threads.wasm lint -rs format_test/
wasm: TypeError: import env:memory must be an object (evaluating 'new WebAssembly.Instance(module, wasi.getImports(module))')

@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 2e8cdfa to 0dd02e1 Compare June 9, 2024 11:03
@kkebo
Copy link
Owner Author

kkebo commented Jun 9, 2024

Wasmtime also cannot run it.

$ wasmtime --dir / --wasm max-wasm-stack=$STACK_SIZE .build/release/swift-formatPackageTests.wasm
Error: failed to run main module `.build/release/swift-formatPackageTests.wasm`

Caused by:
    0: failed to instantiate ".build/release/swift-formatPackageTests.wasm"
    1: unknown import: `env::memory` has not been defined

@kkebo
Copy link
Owner Author

kkebo commented Jun 9, 2024

It seems that runtime support is required to run binaries that built for wasm32-unknown-wasip1-threads.

https://surma.dev/postits/wasi-threads/

@kkebo
Copy link
Owner Author

kkebo commented Jun 9, 2024

Wasmtime 21.0.1 requires the --wasi-modules experimental-wasi-threads -S threads flag.

@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 7f9d3e4 to a6ee612 Compare July 11, 2024 16:24
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from a6ee612 to 5ff79a2 Compare July 30, 2024 15:18
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 2 times, most recently from 9e9cf60 to da9d9b5 Compare September 1, 2024 03:56
Package.swift Outdated Show resolved Hide resolved
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 2 times, most recently from 566e554 to 63da388 Compare September 17, 2024 17:06
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 63da388 to 5431bf7 Compare October 7, 2024 16:51
@kkebo
Copy link
Owner Author

kkebo commented Oct 7, 2024

Now, the wasm32-wasip1-threads branches of swift-markdown and swift-cmark have been unified with the wasm32-wasi branches.

@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 5431bf7 to 1631296 Compare October 16, 2024 17:57
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 1631296 to f71f9f0 Compare October 28, 2024 11:37
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 3 times, most recently from d1c7031 to 6f01720 Compare November 14, 2024 18:04
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 3 times, most recently from 3a1d806 to d9e28b8 Compare November 23, 2024 11:49
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 2 times, most recently from 3520525 to b9cb676 Compare November 30, 2024 12:14
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 2 times, most recently from c2c5503 to 58666a4 Compare December 6, 2024 13:54
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch 2 times, most recently from edecce8 to 3a1bcc6 Compare December 26, 2024 18:17
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from 3a1bcc6 to acd3470 Compare January 20, 2025 09:58
@kkebo kkebo force-pushed the wasm32-wasip1-threads branch from acd3470 to 60a71f8 Compare January 21, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant