runtime

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAssetsFSRequiredInProd    = errors.New("WithAssetsFS is required in production mode (BIFROST_DEV not set)")
	ErrManifestMissingInAssetsFS = errors.New("manifest.json not found in embedded assets")
	ErrEmbeddedRuntimeNotFound   = errors.New("embedded runtime helper not found; run 'bifrost-build' to generate it")
	ErrEmbeddedRuntimeExtraction = errors.New("failed to extract embedded runtime")
	ErrEmbeddedRuntimeStart      = errors.New("failed to start embedded runtime")
)
View Source
var BunRendererDevSource string
View Source
var BunRendererProdSource string

Functions

func ExtractEmbeddedRuntime

func ExtractEmbeddedRuntime(assetsFS embed.FS) (string, func(), error)

func HasEmbeddedRuntime

func HasEmbeddedRuntime(assetsFS embed.FS) bool

func IsDev

func IsDev() bool

func IsProd

func IsProd() bool

Types

type BifrostError

type BifrostError struct {
	Message string
	Stack   string
	Errors  []ErrorDetail
}

func (*BifrostError) Error

func (e *BifrostError) Error() string

type Client

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

func NewClient

func NewClient() (*Client, error)

func NewClientFromExecutable

func NewClientFromExecutable(executablePath string, cleanup func()) (*Client, error)

func (*Client) Build

func (c *Client) Build(entrypoints []string, outdir string) error

func (*Client) BuildWithTarget

func (c *Client) BuildWithTarget(entrypoints []string, outdir string, target string) error

func (*Client) Render

func (c *Client) Render(path string, props map[string]any) (types.RenderedPage, error)

func (*Client) Stop

func (c *Client) Stop() error

type ErrorDetail

type ErrorDetail struct {
	Message   string
	File      string
	Line      int
	Column    int
	LineText  string
	Specifier string
	Referrer  string
}

type Mode

type Mode int
const (
	ModeDev Mode = iota
	ModeProd
)

func GetMode

func GetMode() Mode

Jump to

Keyboard shortcuts

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