fastC

fastc-core

fastc-core — the curated stdlib ecosystem

fastC commits to one curated answer per domain. Eleven packages, capability-typed in their public signatures, with supply-chain provenance from day one.

Each package's public API lives in two places: inside the v1.0 compiler's built-in prelude (every fastC program can use cli::has_flag; today), and in a public preview repo at github.com/Skelf-Research/fastc-core-<name>. The packages become installable via fastc add when the v1.1 vendor-consumption flow lands. The API surface is final — what you see in v1.0 is what v1.x ships.

The eleven packages

Package Purpose Capability Notes Repo
cli argv + flag parsing none Positional args, short/long flags, --help generation. No subcommand framework yet — keep it small. repo →
log structured leveled logging none trace / debug / info / warn / error. JSON or human output. Writes to a passed-in sink, not stderr by default. repo →
json encode + integer-field decode none Encode any value. Decode into struct shapes with integer / string / bool fields. Float decode lands in v0.2. repo →
toml read-only flat-table TOML none Reads fastc.toml-shaped manifests. Arrays of tables in v0.2. Write support is not on the roadmap. repo →
http HTTP/1.1 client CapNetConnect GET / POST / PUT / DELETE. TLS via OpenSSL at link time. HTTP/2 is deferred. repo →
time wall-clock + ISO 8601 CapTimeRead Monotonic and wall clocks, ISO 8601 formatting + parsing, UTC-only. Time zones land in v0.2. repo →
base64 RFC 4648 encode/decode none Standard and URL-safe alphabets. Streaming encoder. Constant-time decode for crypto callers. repo →
uuid RFC 4122 v4 + parse/format CapRand for v4 v4 generation, v1/v3/v5 parse-only, RFC 4122 textual format. v7 (time-ordered) in v0.2. repo →
crypto-primitives SHA-256, HMAC, constant-time compare CapRand for random_bytes Primitives, not protocols. Use http for TLS. SHA-512 and Ed25519 land in v0.2. repo →
regex Thompson NFA, no backreferences none Linear-time matching. No backreferences, no lookaround — by design. Catastrophic backtracking is structurally impossible. repo →
sqlite FFI bindings to libsqlite3 CapFsWrite Thin bindings; prepared statements, parameterized queries, transactions. libsqlite3 is the floor, not a vendored copy. repo →

Why curated

Most ecosystems have three or five competing libraries per domain. Eleven JSON libraries; six logging crates; four HTTP clients. fastC commits to one — explicitly — for three reasons:

  1. Agent decision-load. A coding agent that has to pick between serde_json and simd-json and sonic-rs is going to pick wrong some of the time. The most expensive bug is the one where the agent picked the right library for the wrong reason. fastc-core removes the choice.
  2. Capability-audit feasibility. Every fastc-core package's public surface declares its capabilities. The total attack surface of "all of fastc-core" is small enough to read end-to-end. Eleven competing libraries per domain is not.
  3. Doc surface. One http module, one set of docs, one set of worked examples. No "which logger should I use in 2026" blog post per quarter.

The trade-off is real: if you want a different JSON library, you will be writing it yourself. fastC's bet is that the structural win is worth the constraint.

How to consume today

Every fastc-core package is in the v1.0 compiler's prelude. You do not add a dependency; you just use it.

use cli::has_flag;
use log::info;

fn main(caps: Caps) -> i32 {
  let verbose = has_flag("--verbose");
  if verbose {
    info("starting up");
  }
  return 0;
}
hello.fc — cli + log out of the box fastC v1.0

How to consume tomorrow (v1.1)

When v1.1 ships the vendor-consumption flow, the prelude bundles come unpinned and you declare your fastc-core dependencies the same way you declare any other vendored package: git URL, commit, sha256. fastc add cli will write the manifest entry and vendor the source. No central registry.

# fastc.toml — v1.1 vendor-consumption flow
[package]
name = "my-tool"
version = "0.1.0"

[dependencies]
cli   = { git = "https://github.com/Skelf-Research/fastc-core-cli",   rev = "v0.1.0", sha256 = "..." }
log   = { git = "https://github.com/Skelf-Research/fastc-core-log",   rev = "v0.1.0", sha256 = "..." }
json  = { git = "https://github.com/Skelf-Research/fastc-core-json",  rev = "v0.1.0", sha256 = "..." }
http  = { git = "https://github.com/Skelf-Research/fastc-core-http",  rev = "v0.1.0", sha256 = "..." }
fastc.toml — planned v1.1 manifest shape

See also