{"id":22012993,"url":"https://github.com/exograph/wasm-pg-cloudflare-explorations","last_synced_at":"2026-04-12T05:32:32.068Z","repository":{"id":243066012,"uuid":"811350935","full_name":"exograph/wasm-pg-cloudflare-explorations","owner":"exograph","description":"Code accompanying https://exograph.dev/blog/wasm-pg-explorations-1 and https://exograph.dev/blog/wasm-pg-explorations-2","archived":false,"fork":false,"pushed_at":"2024-06-06T13:20:17.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-12T18:32:40.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://exograph.dev/blog/wasm-pg-explorations-1","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exograph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-06T12:32:36.000Z","updated_at":"2024-12-11T10:37:24.000Z","dependencies_parsed_at":"2024-06-06T14:55:39.222Z","dependency_job_id":"c24f0966-2dba-41db-8079-88d0f5e73771","html_url":"https://github.com/exograph/wasm-pg-cloudflare-explorations","commit_stats":null,"previous_names":["exograph/wasm-pg-cloudflare-explorations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exograph/wasm-pg-cloudflare-explorations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exograph%2Fwasm-pg-cloudflare-explorations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exograph%2Fwasm-pg-cloudflare-explorations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exograph%2Fwasm-pg-cloudflare-explorations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exograph%2Fwasm-pg-cloudflare-explorations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exograph","download_url":"https://codeload.github.com/exograph/wasm-pg-cloudflare-explorations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exograph%2Fwasm-pg-cloudflare-explorations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T03:16:04.437Z","updated_at":"2026-04-12T05:32:32.051Z","avatar_url":"https://github.com/exograph.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Code accompanying the blog post \"Latency at the Edge with Rust/WebAssembly and Postgres\" [Part 1](https://exograph.dev/blog/wasm-pg-explorations-1) and [Part 2](https://exograph.dev/blog/wasm-pg-explorations-2).\n\n## Common setup\n\nVisit [Neon](https://neon.tech) and create a database, say, `todo-db`, with the following table:\n\n```sql\nCREATE TABLE todos (\n  id SERIAL PRIMARY KEY,\n  title TEXT NOT NULL,\n  completed BOOLEAN NOT NULL\n);\n```\n\n## Creating a Hyperdrive\n\nYou need to create a Hyperdrive instance only once but update `wrangler.toml` for each project.\n\nReplace the connection string with the one from the Neon dashboard.\n\n```sh\nnpx wrangler hyperdrive create todo-db-hyperdrive --caching-disabled --connection-string \"postgres://alex:AbC123dEf@ep-cool-darkness-123456.us-east-2.aws.neon.tech/dbname\"\n```\n\nAdd the following to `wrangler.toml` in each `rust-hyperdrive-*` project:\n\n```toml\n[[hyperdrive]]\nbinding = \"todo-db-hyperdrive\"\nid = \"\u003cyour-hyperdrive-id\u003e\"\n```\n\n## Setting the DATABASE_URL secret\n\nFor all `rust-direct-*` projects, set the following environment variables. Alternatively, you can use the \"Integration\" tab in the Cloudflare Worker's dashboard to add the Neon integration, which does the same thing.\n\n```sh\nnpx wrangler secret put DATABASE_URL\n```\n\nThis will ask for the connection URL, which you can obtain from the Neon dashboard.\n\n## Deploying\n\n```sh\nnpx wrangler deploy\n```\n\n## Testing performance\n\nInstall [oha](https://github.com/hatoo/oha) using `cargo install oha`.\n\n```sh\noha -c 1 -n 100 \u003cyour-worker-url\u003e\n```\n\nOf course, you can adjust the concurrency and number of requests as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexograph%2Fwasm-pg-cloudflare-explorations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexograph%2Fwasm-pg-cloudflare-explorations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexograph%2Fwasm-pg-cloudflare-explorations/lists"}