build: allow cornucopia-async to be built in wasm environment #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
info
this PR tweaks the dependency of tokio-postgres so that it can be build within wasm(wasm32-unknown-unknown) context.
tested with connecting to a neon postgres instance within cloudflare-worker.
motivation
currently, cloudflare-worker allows tcp socket connection, which with some tweak enbles cloudflare-worker to use tokio-postgres to directly connect to postgres instances.
https://github.com/cloudflare/workers-rs/tree/aaf5c672c0830e6637d671b4e70c6251fda0c835/examples/tokio-postgres
It would be nice to take the awesome developer experience with cornucopia with me to developer serverless app powered by postgres.