Skip to content

build: allow cornucopia-async to be built in wasm environment#256

Open
extraymond wants to merge 1 commit intocornucopia-rs:mainfrom
extraymond:postgres_wasm
Open

build: allow cornucopia-async to be built in wasm environment#256
extraymond wants to merge 1 commit intocornucopia-rs:mainfrom
extraymond:postgres_wasm

Conversation

@extraymond
Copy link

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.

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.

1 participant