browser

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package browser holds the settings the browser entry point applies to every model, shared with the check that runs the engine under TinyGo the way the page does.

Index

Constants

View Source
const (
	// TransformWork is the transform's work budget unless the settings
	// say otherwise: the browser cannot interrupt a running transform,
	// so it answers within a minute or so rather than hours.
	TransformWork = 1 << 29
	// TransformTol is the transform's tolerance unless the settings say
	// otherwise. At the engine's 1e-3 a model with many sources or
	// period-scoped draws needs a pass of 2^20 grid points, above
	// TransformBytes; within 1% it closes grids earlier.
	TransformTol = 0.01
	// TransformBytes is the grids a transform pass may hold unless the
	// settings say otherwise. TinyGo doubles the wasm memory each time
	// the heap grows, after a collection leaving less than a third free,
	// and stops the engine when a doubling fails; it reserves up to three
	// times a pass's grids. Within 2 GB a doubling stays inside wasm32's
	// 4 GB, so a pass holds at most a third of that.
	TransformBytes = 640 << 20
	// MaxHeap is the most the TinyGo heap may reserve: any doubling from
	// within it stays inside wasm32's 4 GB.
	MaxHeap = 2 << 30
)

Variables

This section is empty.

Functions

func Apply

func Apply(cfg *variate.Config)

Apply sets the browser's settings on cfg: one worker, the node histograms the page draws, and the transform's budgets and tolerance where unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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