goflare

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: MIT Imports: 8 Imported by: 0

README ¶

GoFlare

Project Badges

GoFlare is a lightweight and flexible handler designed to help you build and deploy Go-based WebAssembly (WASM) and JavaScript bundles for Cloudflare Workers, Pages, or Functions.

It’s not a full framework — GoFlare is meant to fit into your existing toolchain. You can use it as a standalone build step or attach it to any build or deploy workflow you already have.


🚀 Features

  • Go → WASM/JS conversion made simple
  • Compatible with Cloudflare’s edge platforms (Workers, Pages, and Functions)
  • Integrates easily with CI/CD pipelines or other Go tools
  • Minimal dependencies and lightweight footprint
  • Provides a unified handler interface to hook into other builders or deployment systems

🧩 Example Usage

import "github.com/cdvelop/goflare"



Contributing

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type Config ¶

type Config struct {
	AppRootDir                 string // default: "."
	WorkerDirSubRelativeOutput string // output path for worker.js and app.wasm file (relative) eg: "deploy"
	MainInputFile              string // eg: "main.worker.go"
	Logger                     func(message ...any)
	CompilingArguments         func() []string
	// Pages-specific configuration
	PagesApiRoutePrefix string // API route prefix for Pages Functions (default: "/api/")
	PagesWasmFileName   string // WASM file name for Pages Functions (default: "app.wasm")
}

type Goflare ¶

type Goflare struct {
	// contains filtered or unexported fields
}

func New ¶

func New(c *Config) *Goflare

func (*Goflare) GeneratePagesFiles ¶ added in v0.0.3

func (g *Goflare) GeneratePagesFiles() error

GeneratePagesFiles generates all necessary files for Cloudflare Pages Functions using Advanced Mode

func (*Goflare) GenerateWorkerFiles ¶ added in v0.0.3

func (g *Goflare) GenerateWorkerFiles() error

Jump to

Keyboard shortcuts

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