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

Rename thread_spawn import #387

Merged
merged 1 commit into from
Jan 25, 2023
Merged

Conversation

yamt
Copy link
Contributor

@yamt yamt commented Jan 20, 2023

Following the wit-defined ABI:
WebAssembly/wasi-threads#26

@abrown
Copy link
Collaborator

abrown commented Jan 20, 2023

I don't think this is right; IIRC, WIT dashes are converted to underscores.

@yamt
Copy link
Contributor Author

yamt commented Jan 23, 2023

I don't think this is right; IIRC, WIT dashes are converted to underscores.

wit-bindgen seems to convert C identifiers. but not import names.

@yamt yamt marked this pull request as ready for review January 23, 2023 03:37
yamt added a commit to yamt/wasm-micro-runtime that referenced this pull request Jan 23, 2023
@sbc100
Copy link
Member

sbc100 commented Jan 23, 2023

I don't think this is right; IIRC, WIT dashes are converted to underscores.

wit-bindgen seems to convert C identifiers. but not import names.

If thats true, I hope its not to late to revisit. I would hope we could choose a convention for import/export names that aligns the symbol names normally found in programming languages. As programmers, we not used to seeing hyphens in the middle of identifiers.

@yamt
Copy link
Contributor Author

yamt commented Jan 23, 2023

I don't think this is right; IIRC, WIT dashes are converted to underscores.

wit-bindgen seems to convert C identifiers. but not import names.

If thats true, I hope its not to late to revisit. I would hope we could choose a convention for import/export names that aligns the symbol names normally found in programming languages. As programmers, we not used to seeing hyphens in the middle of identifiers.

as preview2 heavily uses names with hyphens, i thought it was the latest trend.
eg.

    (import "wasi-filesystem" "append-via-stream" (func $_ZN22wasi_snapshot_preview18bindings15wasi_filesystem17append_via_stream10wit_import17hd102ec87cb8cdfd2E (;2;) (type 2)))

wrt this specific change, i even have confirmed the intention explicitly: WebAssembly/wasi-threads#26 (comment)
at least it was @loganek 's intention to use hyphen.

@abrown
Copy link
Collaborator

abrown commented Jan 23, 2023

wit-bindgen seems to convert C identifiers. but not import names.

Yeah, sorry to confuse things; I was mistaken. Indeed, like @yamt says, the import names will have hyphens. But the C generated from WIT would have the expected underscores. Since this is what users would typically interact with, I think it is fine for the lower level WIT names to use the "almost a convention" hyphens that WIT has transitioned to.

@sbc100
Copy link
Member

sbc100 commented Jan 23, 2023

wit-bindgen seems to convert C identifiers. but not import names.

Yeah, sorry to confuse things; I was mistaken. Indeed, like @yamt says, the import names will have hyphens. But the C generated from WIT would have the expected underscores. Since this is what users would typically interact with, I think it is fine for the lower level WIT names to use the "almost a convention" hyphens that WIT has transitioned to.

I guess I missed that transition. Maybe it happened a repo I'm not tracking.

@yamt
Copy link
Contributor Author

yamt commented Jan 23, 2023

wit-bindgen seems to convert C identifiers. but not import names.

Yeah, sorry to confuse things; I was mistaken. Indeed, like @yamt says, the import names will have hyphens. But the C generated from WIT would have the expected underscores. Since this is what users would typically interact with, I think it is fine for the lower level WIT names to use the "almost a convention" hyphens that WIT has transitioned to.

I guess I missed that transition. Maybe it happened a repo I'm not tracking.

honestly speaking, i feel the transition a bit awkward and am curious about rationales.
but i guess it isn't something specific to this PR.

@abrown
Copy link
Collaborator

abrown commented Jan 25, 2023

i guess it isn't something specific to this PR

Yeah, we should bring up the name convention change in the next WASI meeting. In the meantime, should I merge this?

@sbc100
Copy link
Member

sbc100 commented Jan 25, 2023

i guess it isn't something specific to this PR

Yeah, we should bring up the name convention change in the next WASI meeting. In the meantime, should I merge this?

sgtm

@abrown abrown merged commit 8f52757 into WebAssembly:main Jan 25, 2023
yamt added a commit to yamt/wasm-micro-runtime that referenced this pull request Jan 25, 2023
wenyongh pushed a commit to bytecodealliance/wasm-micro-runtime that referenced this pull request Jan 26, 2023
yamt added a commit to yamt/wasi-threads that referenced this pull request Feb 1, 2023
john-sharratt pushed a commit to john-sharratt/wasix-libc that referenced this pull request Mar 6, 2023
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
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.

3 participants