Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support build on wasm32#1146

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
L-jasmine wants to merge1 commit intosfackler:master
base:master
Choose a base branch
Loading
fromL-jasmine:fix/wasm32

Conversation

L-jasmine
Copy link

In this line, the parameter KeepaliveConfig is ignored when compiled to wasm32, while there is no corresponding conditional compilation elsewhere. Therefore, I added a conditional compilation for wasm32 in the places where Keepalive is needed. This modification allows the crate to be used normally in wasm32 after replacing the underlying tokio with a patch.

@sfackler
Copy link
Owner

We already test that the crate compiles against wasm32:https://github.com/sfackler/rust-postgres/blob/master/.github/workflows/ci.yml#L50-L75.

If tokio gains direct wasm32 support I'd be happy to expand the supported feature set here, but I don't want to make changes that only work when building against an unspecified tokio fork.

@L-jasmine
Copy link
Author

This is not specific to a particular tokio; it’s just that this crate does not define KeepaliveConfig in wasm32. I’ve ignored all references to KeepaliveConfig in wasm32, and I believe these changes are reasonable.

@sfackler
Copy link
Owner

Theruntime Cargo feature is not supported on wasm32 at this time, and can't be without changes to tokio.

@L-jasmine
Copy link
Author

I am pretty sure that my changes work with standard tokio. Your CI still passes with this PR.

Signed-off-by: csh <458761603@qq.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@L-jasmine@sfackler

[8]ページ先頭

©2009-2025 Movatter.jp