bynk-std 0.371.3

The Bynk standard library's first-party sources as data: the `bynk` surface, the Bynk-written commons, the `bynk.cloudflare` platform adapter, and their per-platform TypeScript bindings.
Documentation

bynk-std

crates.io docs.rs License: MIT OR Apache-2.0

The first-party sources of the Bynk standard library, as data: the .bynk sources and TypeScript bindings the toolchain ships, embedded with include_str!, plus the metadata it reads about them.

It holds:

  • the bynk surface adapter (Clock, Random, Logger, Fetch, Secrets, Locale, Idempotency, Events) and its per-platform bindings for Cloudflare, Node and the browser;
  • the Bynk-written commons: bynk.list, bynk.map, bynk.string, bynk.locale and bynk.locale.types;
  • the bynk.cloudflare platform adapter (Kv, and the experimental Service) and its binding;
  • UNITS, the registry of first-party units: each one's name, kind, source, binding, permanent id block, platform nativity and env-taking providers. bynk-check injects from it, so adding a unit is an entry plus its files;
  • Platform, and the views over the registry: FIRSTPARTY_SOURCES, platform_of and provider_takes_env.

The sources are in lib/: the portable layers in lib/core/ and the platform adapter in lib/cloudflare/. Nothing in lib/core/ depends on lib/cloudflare/.

The crate holds no logic. bynk-check parses and injects these sources when a project uses or consumes them, and re-exports this crate unchanged as bynk_check::firstparty.

Where it sits

bynk-std has no dependencies. It is a second root beside the syntax leaf, read by bynk-check:

bynk-syntax                lexer, parser, AST, CompileError, diagnostic codes
├── bynk-project           project model: discovery, unit graph, paths
├── bynk-ts                the TypeScript tree and its printer
├── bynk-render            diagnostic rendering
├── bynk-fmt               the formatter
└── bynk-check             name resolution and type checking   + project, std
    ├── bynk-ir            declaration-level IR
    │   └── bynk-lower     AST → IR helpers
    ├── bynk-emit          build sequencing, TS emission       + ts, ir, lower, project
    │   ├── bynk-strip     TS → JS type-stripping              + ts
    │   └── bynk-driver    shared CLI command bodies           + fmt, render, ts
    └── bynk-ide           non-bailing editor analysis         + project, fmt
bynk-std                   first-party sources and bindings, as data

Each crate depends on its parent in the tree, plus any crates listed after its +. The front-ends sit on top: the bynkc and bynk CLIs over bynk-driver, the bynkc-lsp language server (bynk-lsp) over bynk-ide, and the unpublished bynk-wasm playground module over bynk-emit, bynk-strip, and bynk-ide.

Most users compile Bynk through the bynkc / bynk CLIs rather than depending on this crate directly.

Use

[dependencies]
bynk-std = "0.371"
use bynk_std::{FIRSTPARTY_SOURCES, Platform};

for (unit, source) in FIRSTPARTY_SOURCES {
    println!("{unit}: {} bytes", source.len());
}
let binding = Platform::Node.bynk_binding_source();

See the API docs for the full surface.

License

Licensed under either of Apache-2.0 or MIT at your option.