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

Fix wasm32-unknown-unknown support #274

Merged
merged 1 commit into from
May 24, 2024

Conversation

jbms
Copy link
Contributor

@jbms jbms commented Apr 12, 2024

XXH_STATIC_ASSERT appears to already have a reasonable definition, and defining it to 0 breaks uses of it.

I'm not sure why that definition was added originally.

This also fixes the github action workflow to actually build the wasm target; previously it was just building the native target which allowed this issue to slip through.

Fixes #271.

`XXH_STATIC_ASSERT` appears to already have a reasonable definition, and
defining it to `0` breaks uses of it.
jszwedko added a commit to vectordotdev/vector that referenced this pull request Apr 24, 2024
To fix a WASM build issue. We can upgrade again once gyscos/zstd-rs#274 is
merged and released (or gyscos/zstd-rs#271 is otherwise fixed).

Also add a test that builds the playground to catch this sort of regression in the future.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
github-merge-queue bot pushed a commit to vectordotdev/vector that referenced this pull request Apr 25, 2024
* chore(dev): Bump down zstd-sys from 2.0.10 to 2.0.9

To fix a WASM build issue. We can upgrade again once gyscos/zstd-rs#274 is
merged and released (or gyscos/zstd-rs#271 is otherwise fixed).

Also add a test that builds the playground to catch this sort of regression in the future.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Revert "chore(deps): Bump the zstd group with 1 update (#20199)"

This reverts commit 0599d60.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* chmod +x

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Just put directly in env prepare

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* Bump timeout

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
@xangelix
Copy link

xangelix commented May 7, 2024

@gyscos apologies for reaching out directly, but could you take a look at this? should be a quick fix for wasm32 along with #275

@juntyr
Copy link

juntyr commented May 23, 2024

I, unfortunately, have to bump this issue as well as pinning zstd-sys to =2.0.9 is no longer possible for me as now other dependencies, which don't explicitly target wasm, have now upgraded their zstd-sys dependencies, resulting in conflicts with my pin. @gyscos, once you find some time, it would be amazing if you could accept this minimal PR and publish a fix release. Thank you for all your work on this crate!

@gyscos
Copy link
Owner

gyscos commented May 24, 2024

Thanks for the work!

The initial wasm32-unknown support was added in #139, I'm also not really sure why this definition was added. Let's merge this if this helps you!

@gyscos gyscos merged commit a2125e3 into gyscos:main May 24, 2024
@juntyr
Copy link

juntyr commented May 26, 2024

Thank you so much! Would you be able to publish a patch release for zstd-sys to crates.io / what’s your rough timeline until the next release?

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.

zstd-sys for wasm32-unknown-unknown is broken
4 participants