Skip to content

Conversation

@kwonoj
Copy link
Member

@kwonoj kwonoj commented Aug 1, 2022

Description:

This PR implements, exposes counterpart of *Sync interfaces to @swc/wasm, as same as @swc/core. It'll allow @swc/wasm becomes near-complete drop in replacement to @swc/core as much as possible.

One important thing to note is, even though those are async interfaces there aren't any actual async implementation in place. In short, this is pretty much similar to JS-side facade wrap like new Promise(() => swcSync()), which only wraps sync interfaces to async. The only difference is it is exposed in bindgen level, so we don't need to come up with some custom binding wrapper to make things work.

Once there is support for the thread / async in wasm with standard support we'll update those internals accordingly. We do not expect to try some workaround approach like using bindgen with workers, etcs at this moment.

BREAKING CHANGE:

Related issue (if exists):

@kdy1 kdy1 added this to the Planned milestone Aug 1, 2022
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!


swc-bump:

  • swc

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a conflict

@kwonoj kwonoj force-pushed the feat-wasm-async-interface branch from 508e9c4 to 9576e7e Compare August 1, 2022 02:37
@kwonoj
Copy link
Member Author

kwonoj commented Aug 1, 2022

@kdy1 yup, should be resolved by now.

@kdy1 kdy1 enabled auto-merge (squash) August 1, 2022 02:41
@kdy1 kdy1 merged commit 281bdd9 into swc-project:main Aug 1, 2022
@kdy1 kdy1 modified the milestones: Planned, v1.2.222 Aug 1, 2022
@kwonoj kwonoj deleted the feat-wasm-async-interface branch August 2, 2022 00:04
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants