Developer API · default branch

Typed Go contracts and explicit runtime integration

The default branch exposes ten public packages: six core contracts plus four concrete client integrations. Published-version links remain pinned to v1.0.1, which may predate the newest default-branch packages.

Install

Pin the CLI and library to one immutable version

go install github.com/Voskan/BatchWeaver/cmd/batchweaver@v1.0.1
go get github.com/Voskan/BatchWeaver@v1.0.1

Package map

Ten documented public packages

Typed declaration

Connect scalar and batch implementations

This complete pattern is statically discoverable and performs no implicit registration or I/O.

package users

import (
    "context"

    batchweaver "github.com/Voskan/BatchWeaver"
    "github.com/Voskan/BatchWeaver/operation"
)

type User struct { ID int; Name string }

func loadUser(ctx context.Context, id int) (User, error) {
    return User{ID: id}, nil
}

func loadUsers(
    ctx context.Context,
    req batchweaver.BatchRequest[int],
) (batchweaver.BatchResponse[User], error) {
    values := make([]User, req.Len())
    for i, item := range req.Items() {
        values[i] = User{ID: item.Key}
    }
    return batchweaver.OrderedOutcomes(req, values)
}

var GetUser = batchweaver.MustDeclareFunction(
    operation.MustNewSpec(
        operation.MustParseID("users.get"),
        operation.ReadOnly(),
        operation.WithOrderedResults(),
        operation.WithRequestScope(),
    ),
    loadUser,
    loadUsers,
)

Runtime

Coalesce only inside an explicit scope

Bind an operation to an engine, enter a scope, and call the typed bound operation. Partition identity and queue limits remain explicit in the binding.

1. Engine

Own lifecycle, defaults, hooks, and operation coordinators.

2. Binding

Connect a declaration, key strategy, provider, partition, and limits.

3. Scope

Define the request boundary carried through context.

4. Do

Submit a typed key and receive one independently cancellable outcome.

Command line

Compiler, runtime, adapters, operations, and release assurance

Analyze and prove

scanoperationcandidateproveproofassumptionstrategybarrier

Transform and execute

transformbuildruntestruntimetool-exec

Adapters

adapterhttpopenapigraphqlgrpc

Adaptive operations

profiletunefairnessoverloadwaverecursive

Editor and daemon

lspeditordaemon

Assurance

doctorsecuritycompatibilityverifyreleaseversion
batchweaver help
batchweaver help <command>

Compatibility contract

What the default branch does and does not promise

Implemented surface

  • Go 1.26.x (minimum 1.26.0; current 1.26.5)
  • Public packages listed above
  • database/sql, net/http, pgx v5, go-redis v9, gqlgen, and grpc-go providers
  • Verified release archives and VSIX for published versions
  • Documented schema and ABI rejection behavior

Not part of the supported stable surface

  • Arbitrary SQL or network request fusion
  • Implicit source mutation
  • Stable v1 compatibility promise
  • Hosted attestation or cryptographic signatures
  • Client/platform combinations absent from the compatibility matrix

Read the full implementation and development report →