🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

faf-scoring-kernel

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

faf-scoring-kernel

FAF Mk4 Scoring Kernel — WASM-compiled Rust engine for scoring .faf files and compiling .fafb binaries. The Foundry.

latest
Source
npmnpm
Version
2.0.3
Version published
Weekly downloads
595
119.56%
Maintainers
1
Weekly downloads
 
Created
Source

faf-scoring-kernel

FAF Mk4 Scoring Kernel — WASM-compiled Rust engine for scoring .faf files and compiling .fafb binaries.

The Foundry. 281KB. 136 tests. In Rust We Trust.

Install

npm install faf-scoring-kernel

Works in Node.js and Bun.

Usage

const kernel = require('faf-scoring-kernel');

// Score a .faf file
const result = JSON.parse(kernel.score_faf(`
project:
  name: my-project
  goal: Ship fast
  main_language: TypeScript
`));

console.log(result.score);  // 14
console.log(result.tier);   // 🔴
console.log(result.populated, '/', result.active);  // 3 / 21

API

8 pure-function exports. No classes. No state.

FunctionInputOutputDescription
sdk_version()stringEngine version
score_faf(yaml)YAML stringJSON stringMk4 base scoring (21 slots)
score_faf_enterprise(yaml)YAML stringJSON stringMk4 enterprise scoring (33 slots)
validate_faf(yaml)YAML stringbooleanCheck if valid YAML mapping
compile_fafb(yaml)YAML stringUint8ArrayCompile .faf to .fafb binary
decompile_fafb(bytes)Uint8ArrayJSON stringDecompile .fafb to JSON
score_fafb(bytes)Uint8ArrayJSON stringRead score from .fafb binary
fafb_info(bytes)Uint8ArrayJSON stringHeader/section metadata

Tier System

ScoreTierStatus
100%🏆 TrophyOptimized
99%🥇 GoldExceptional
95-98%🥈 SilverTop tier
85-94%🥉 BronzeProduction ready
70-84%🟢 GreenSolid foundation
55-69%🟡 YellowNeeds improvement
<55%🔴 RedMajor work needed
0%🤍 WhiteEmpty

Compile .fafb

const kernel = require('faf-scoring-kernel');

// Compile YAML to FAFb binary
const yaml = 'faf_version: "1.0"\nproject_name: my-project';
const bytes = kernel.compile_fafb(yaml);
// bytes[0..4] === "FAFB" (magic bytes)

// Decompile back
const json = kernel.decompile_fafb(bytes);

// Read score from binary
const score = kernel.score_fafb(bytes);

What Is This?

This is the universal FAF scoring and compilation engine, compiled from Rust to WebAssembly. It implements:

  • Mk4 Engine — 33-slot scoring with placeholder rejection and tier calculation
  • FAFb Binary Format — 32-byte header, CRC32 checksum, priority sections

One binary. Same scores everywhere. The code is the spec.

  • FAF Format
  • Source
  • IANA Registration

License

MIT

Keywords

faf

FAQs

Package last updated on 15 Mar 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