🧠 Stixflayer 🦑¶
Rust-native STIX 2.1. One spec-compliant core, consumed by many. ⚡
Parse, validate, and serialize at 10–40× the speed of the industry-standard Python validator — with stricter spec enforcement.
-
🚀 Quickstart
Parse a document, build an object, handle errors — in five minutes.
-
📖 Guides
Parsing, building, validation modes, vocabularies, patterns, errors.
-
📚 API reference
Curated reference for every public class and function.
-
🦀 Rust
The native crate, documented where Rust users expect it.
Why another STIX library? 🤔¶
- 🌍 One engine, no validation gaps — most STIX libraries are reimplemented per language, so the same document can be valid in one and rejected in another. stixflayer ships a single Rust core into every language, so data validates the same way everywhere.
- ⚔️ Spec-first, not tool-first — follows the OASIS STIX 2.1 specification, including its MUST/SHOULD distinction. MUST violations fail; SHOULD findings are reported as warnings.
- 🧐 Complete structural validation — rejects empty bundles, malformed identifiers, closed-enumeration violations, and incorrect SCO UUIDv5 hashes, at 10–40× the speed.
Performance 🚀¶
| Operation | Baseline | stixflayer | speedup |
|---|---|---|---|
Parse + validate apt1 bundle |
~47 ms | ~1.6 ms | ~30× 🏎️ |
Parse + validate poisonivy bundle |
~99 ms | ~2.3 ms | ~40× 🏎️ |
Serialize apt1 bundle |
~0.6 ms | ~0.06 ms | ~10× 🏎️ |
Serialize poisonivy bundle |
~1.0 ms | ~0.09 ms | ~12× 🏎️ |
Install ⚡¶
Requires Python 3.11+. Rust users: cargo add stixflayer 🦀 — API docs at
docs.rs/stixflayer.
Credits 🙏¶
Built on OASIS CTI's cti-rust-stix,
the official STIX 2.1 reference implementation in Rust.