FlatBuffers is a cross-platform serialization library developed by Google, designed for memory-efficient, zero-copy binary serialization. In production, it is used as both a schema compiler (flatc) and a set of runtime libraries for over a dozen languages including C++, Java, Rust, Swift, TypeScript, Python, Go, C#, Kotlin, and more. The flatc compiler parses .fbs schema files and generates type-safe accessor code for each target language, enabling applications to read and write serialized data without parsing overhead. The runtime libraries provide builders, readers, verifiers, and support for gRPC integration and a self-describing variant format called FlexBuffers. The architecture is split into two main components: the compiler (written in C++) and the language-specific runtime libraries. The compiler's entry point is flatc_main.cpp, which registers code generators for each language. The runtimes follow a consistent pattern across languages: a FlatBufferBuilder for constructing buffers, Table/Struct base classes for reading, and Verifier for safety checks. Data flows from schema definition to generated code, which is then used by applications to serialize/deserialize data with direct memory access. External dependencies are minimal for the core library (only standard library for most languages), but gRPC integration requires gRPC libraries. The project includes extensive testing, fuzzing, and benchmarking infrastructure to ensure correctness and performance across all supported languages.
Hyperlight is a production-grade library for safely executing untrusted code inside hypervisor-isolated micro virtual machines. It spins up lightweight VMs in milliseconds without requiring a guest kernel or operating system, making it suitable for sandboxing plugins, serverless functions, and other untrusted workloads. The system supports multiple hypervisor backends (KVM on Linux, MSHV on Windows, WHP on Windows, HVF on macOS) and architectures (x86_64, aarch64), with guest binaries compiled as no_std Rust or C ELF files using a custom libc (picolibc). Communication between host and guest is performed via typed function calls serialized with FlatBuffers over VM exits, and the library provides snapshot/restore capabilities using an OCI-compatible image layout for state persistence. The architecture is centered around a host-side Rust library (`hyperlight_host`) that exposes a builder pattern (`SandboxBuilder`) to configure and create sandboxes. The guest runtime (`hyperlight_guest_bin`) handles initialization, page tables, exception handling, and function dispatch. A component model integration (`hyperlight_component_util`) generates Rust bindings from WIT (WebAssembly Interface Types) for higher-level interfaces. The system also includes guest tracing with OpenTelemetry, metrics collection, crash dump generation, and GDB debugging support. External dependencies include hypervisor-specific APIs (KVM ioctls, WHP, HVF), the FlatBuffers serialization library, and the OCI image layout specification for snapshot storage. Key data flows involve the host loading a guest binary, setting up memory regions (code, heap, stack, scratch), registering host functions, and then executing guest functions via VM entries. The guest can call back into the host through registered host functions. Snapshots capture the full guest state (memory, registers, MSRs) and can be saved to disk as OCI-compatible blobs, then restored to create new sandboxes or recover from failures. The library is extensively tested with unit tests, integration tests, fuzz targets, and concurrency stress tests, and is maintained as a CNCF sandbox project with active development and frequent releases.
DexKit is a high-performance C++ library for runtime parsing and querying of Android DEX bytecode, primarily used by Xposed module developers to locate obfuscated classes, methods, and fields. It provides a rich DSL in Kotlin/Java for constructing structural queries based on annotations, opcodes, string usage, field/method references, and more. The core engine parses DEX files from APK archives, builds in-memory indexes, and uses algorithms like Aho-Corasick for substring matching and the Hungarian algorithm for unordered set matching. Communication between the native C++ layer and JVM is handled via FlatBuffers serialization. The library also includes an optional caching layer (`DexKitCacheBridge`) for persisting query results across app restarts. It is distributed as an Android AAR via Maven Central and includes a demo app and unit tests.
Netron is a cross-platform neural network model visualizer that supports a wide range of deep learning frameworks (ONNX, TensorFlow, PyTorch, CoreML, etc.). It operates as an Electron desktop application, a web app, and a Python-based CLI/server. The architecture is modular: each model format is handled by a dedicated `ModelFactory` class implementing `match()` and `open()` methods, which parse binary or protobuf/flatbuffers serialized models into a uniform internal graph representation (Model -> Graph -> Node -> Value/Tensor). The application provides interactive graph visualization with SVG rendering, attribute inspection, and export capabilities. While primarily an application, it contains substantial data-processing code for format parsing, tensor decoding, and schema-driven metadata handling. The codebase is well-structured with consistent patterns, though it exhibits some duplication across format parsers and experimental/partial support for minority formats. The Python server (`server.py`) and the core binary parsing libraries (`base.js`, `protobuf.js`, `flatbuffers.js`) are independently reusable.
Luban is a game configuration solution that transforms structured data (Excel, JSON, YAML, Lua, XML, etc.) into strongly-typed code and serialized data for multiple target languages (C#, Java, Go, C++, Rust, Python, TypeScript, Lua, etc.) and data formats (binary, JSON, protobuf, flatbuffers, msgpack, BSON, etc.). It is implemented as a .NET 8 console application with a plugin-based pipeline architecture: schema loading → data loading → validation → code generation → data export. The core engine (Luban.Core) provides extensible interfaces for custom loaders, validators, code targets, and data targets, all discovered via assembly attributes. Code generation uses Scriban templates with language-specific extensions, and data serialization employs a custom compact binary protocol (ByteBuf). The tool is widely used in game development for managing configuration data across engines like Unity, Unreal, Godot, and Cocos.