cloudflare-workers-go

module
v0.0.0-...-8f0a20d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2021 License: Apache-2.0

README

👷 CloudFlare Workers for Go

cfgo uses WebAssembly to run Go projects as CloudFlare Workers. It exposes the APIs, patches the missing runtime functions and glues the compiler to the CloudFlare tools.

To set up a project, install CloudFlare Wrangler and run:

wrangler generate yourapp https://github.com/fikisipi/cloudflare-workers-go
🚴 Example deployment
~ wrangler login
~ wrangler publish
go build → worker/module.wasm
created worker/main.js in 1.2s
✨  Build completed successfully!
✨  Successfully published your script to
 https://myproject.myaccount.workers.dev

This runs the demos available in src/main.go.

🚧️ TODO
  • Event/Request handling API
  • fetch API
  • Handle wasm_exec from non-latest (<1.16) & tinygo
  • KV for Workers API
    • TODO : add metadata and cursor pagination
  • WebSocket API
  • Support for streaming & bytes in fetch
  • 💥 reducing worker size
    • code stripping? (already doing AST optimization in wasm_exec)
    • handwritten optimizations
    • stdlib optimizations? net/http/roundtrip_js.go, reflect/*.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL