# francisrstokes/construct-js

🛠️A library for creating byte level data structures.

Repository: https://github.com/francisrstokes/construct-js
Canonical: https://ross.abutalabs.com/products/construct-js
Language: TypeScript
License: MIT
License Family: permissive
Topics: binary, byte, structure, construct
Last push: 2023-03-05T09:09:25+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2728, "days_push": 1277, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1370, forks 29 (observed 2026-08-28T04:04:31.879802+00:00)

## What it is
construct-js is a TypeScript library for declaratively building byte-level data structures with typed fields, nested structs, pointers, sizeof fields, and per-field endianness. It outputs standard Uint8Array values and works in both the browser and Node.js.

## Use cases
- assemble binary file formats in javascript
- build binary protocols without manual ArrayBuffer offset math
- create structs with specific endianness and alignment
- generate binary data for embedded or hardware interfaces from node
- serialize fixed-layout binary headers
- construct packed binary payloads in the browser

## When to choose
- you need to hand-assemble or define binary layouts in JS/TS
- you want pointers, sizeof, alignment, and endianness control in a small dependency
- you need output as a standard Uint8Array for browser or node use

## When to avoid
- you need to parse or decode arbitrary existing binary formats rather than construct them
- you want schema-based serialization like protobuf with cross-language support
- you need streaming or incremental serialization of large data

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, developer-tools
- domain: developer-tools, files, web-development
- platform: browser, cross-platform
- tags: binary-data, byte-level, structs, endianness, uint8array, bitfields, nodejs, typescript

## Member repositories
- francisrstokes/construct-js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:31.879802+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:55.202028+00:00, confidence not recorded.
  - readme: https://github.com/francisrstokes/construct-js (fetched 2026-08-28T04:04:31.879802+00:00, sha 372ca9278a1f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
