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

Async-Stripe compilation failing due to runtime requirement and unable to solely extract structs #631

Open
WarrenN1 opened this issue Nov 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@WarrenN1
Copy link

WarrenN1 commented Nov 1, 2024

Describe the bug

I am compiling via wasm32-unknown-unknown and I have structs that contain stripe IDs. I would like to be able to serialize etc. which is all supported, but the TLS and tokio is not supported in WASM and therefore the stripe async library will not compile.

I need to simply import only the structs and not the client. In library terms, importing ids, resources and none of the client and/or async dependencies.

To Reproduce

Create a trunk project and then set a dependency for async-strip = async-stripe = { version = "*", features = [""]}

Expected behavior

There should be a way to import just the structs with serialization etc. without importing the client.

Code snippets

No response

OS

Ubuntu 22

Rust version

rustc 1.82.0 (f6e511eec 2024-10-15)

Library version

0.15.1

API version

2020-08-07

Additional context

No response

@WarrenN1 WarrenN1 added the bug Something isn't working label Nov 1, 2024
@omarabid
Copy link

add default-feature = false to prevent the tokio runtime from being pulled.

@WarrenN1
Copy link
Author

This does not work. It causes the entire library to not be imported because the library seems to mandate a runtime.,

@omarabid
Copy link

You need to make your own implementation of the Client that uses Cloudflare worker Fetch and wait_until.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants