🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

hyperschema-c

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperschema-c

C code generation for Hyperschema

latest
Source
npmnpm
Version
0.4.0
Version published
Maintainers
1
Created
Source

hyperschema-c

C code generation for Hyperschema. Transforms schema definitions into C structs with preencode/encode/decode functions using libcompact.

npm i hyperschema-c

Usage

const CHyperschema = require('hyperschema-c')

const schema = CHyperschema.from('./spec')

// Get generated C source as strings
const { header, source } = schema.toCode()

// Or write the generated files to disk
CHyperschema.toDisk(schema, './output')

toDisk writes:

output/
  <target>.h
  <target>.c
  schema.json
  CMakeLists.txt

where <target> is derived from the schema's namespaces — <ns>_schema for a single namespace, <ns1>_<ns2>_schema for multiple. A schema in namespace hc produces hc_schema.h and hc_schema.c.

License

Apache-2.0

FAQs

Package last updated on 04 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts