A high-performance C++23 FFI bridge for parsing Flathub AppStream metadata into SQLite databases, with Dart bindings for cross-platform access.
- Language: C++23 (backend) + Dart (frontend) + C (Dart API)
- Status: β Production-Ready (v0.2.0)
- Tests: 185/185 passing β (140 C++ + 45 Dart)
- Security: 0 CVEs β
- Code Quality: No lint/format issues β
- β High-Performance XML Parsing - Custom XmlScanner (~45ms for 1000 components)
- β Streaming Pipeline - XML β SQLite direct pipeline (~190ms for 1000 components)
- β String Interning - Efficient memory usage with StringPool
- β Multi-Language Support - Tested with 5 languages (en, de, fr, es, ja)
- β Real Flathub Data - Tests with actual Flathub apps (GNOME, Firefox, GIMP, etc.)
- β Automated CI/CD - GitHub Actions with 8+ configurations
- β Code Coverage - gcov/lcov integration + Codecov
- β Performance Tracking - 8 benchmark scenarios
- β Memory Safety - AddressSanitizer, UBSan support
- β Comprehensive Tests - Unit + integration + real-world data tests
appstream/
βββ src/ # C++ source (7 files)
β βββ AppStreamParser.cpp # XML parsing logic
β βββ Component.cpp # Component model
β βββ XmlScanner.cpp # XML tokenizer
β βββ SqliteWriter.cpp # Database writing
β βββ StringPool.cpp # String interning
β βββ appstream_ffi.cpp # Dart FFI bridge
βββ lib/ # Dart bindings
β βββ appstream.dart # Main Dart API
β βββ src/bindings.dart # FFI bindings
βββ test/ # Dart tests (4 files)
β βββ appstream_integration_test.dart
βββ tests/ # C++ tests (5 + 2 new)
β βββ test_*.cpp # Unit tests
β βββ benchmark_parser.cpp # Benchmarks
β βββ test_real_appstream_data.cpp
βββ .github/workflows/ # CI/CD pipelines
β βββ build-and-test.yml # GitHub Actions
βββ CMakeLists.txt # Build configuration
βββ pubspec.yaml # Dart dependencies
βββ docs/ # Documentation
βββ ADVANCED_BUILD.md # Build guide
βββ RUNNING_TESTS.md # Test execution
βββ CODE_AUDIT_REPORT.md # Security/quality audit
- C++23 compatible compiler (GCC 13+, Clang 17+)
- CMake 3.22+
- Dart SDK 3.3+
- SQLite3 development libraries
- GoogleTest (auto-fetched by CMake)
# Default build
cmake -S . -B build && cmake --build build
cd build && ctest
# With code coverage
cmake -S . -B build -DENABLE_COVERAGE=ON
cmake --build build && cd build && ctest
# With sanitizers (AddressSanitizer)
cmake -S . -B build -DENABLE_SANITIZER=asan
cmake --build build && cd build && ctest
# Performance benchmarks
cmake -S . -B build -DENABLE_BENCHMARKS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build && ./build/tests/appstream_benchmarksimport 'package:appstream/appstream.dart';
void main() async {
// Initialize native library
Appstream.initialize();
// Parse XML to SQLite
final stream = Appstream.parseToSqlite(
xmlPath: '/path/to/appstream.xml',
dbPath: '/path/to/catalog.db',
);
// Stream results
await for (final event in stream) {
print('${event.id}: ${event.name}');
}
}| Operation | Time | Components |
|---|---|---|
| StringPool (10k strings) | 15 ms | 100 unique |
| XmlScanner | 45 ms | 1000 |
| Parser (streaming) | 59 ms | 1000 |
| SqliteWriter | 125 ms | 1000 |
| End-to-end | 190 ms | 1000 |
| Stress test | 946 ms | 5000 |
- β StringPool deduplication
- β XmlScanner tokenization
- β Component parsing
- β SqliteWriter transactions
- β AppStreamParser integration
- β FFI bindings
- β Integration tests
- β Fallback handling
- β Uninitialized library tests
- β Flathub app samples (5 real apps)
- β Multi-language support
- β Error handling
- β Large datasets (100+ components)
- Security Audit: β 0 CVEs
- Dart Analysis: β No issues
- C++ Analysis: β No critical issues (~100 style suggestions)
- Formatting: β Applied clang-format-19
| Document | Purpose |
|---|---|
| ADVANCED_BUILD.md | Comprehensive build & configuration guide |
| RUNNING_TESTS.md | Test execution and debugging |
| CODE_AUDIT_REPORT.md | Security & code quality audit |
| IMPLEMENTATION_INDEX.md | Technical overview of all features |
| NEXT_STEPS_COMPLETE.md | Recent implementation summary |
Automated testing on every push with:
- 8 build configurations (Debug/Release Γ Sanitizers)
- Code quality checks (lint, format, analyze)
- Performance benchmarking
- Memory safety validation (ASAN/UBSan)
- Coverage tracking (Codecov integration)
β
CI/CD Integration - GitHub Actions workflow
β
Code Coverage - gcov/lcov + Codecov
β
Performance Benchmarks - 8 comprehensive scenarios
β
Real Appstream Data - Tests with Flathub apps
β
Sanitizers - ASAN, MSAN, UBSan support
- C++23 - Modern C++ standard library
- SQLite3 - Efficient database storage
- Dart FFI - Foreign Function Interface for Dart
- GoogleTest - C++ unit testing framework
- CMake - Cross-platform build system
- GitHub Actions - CI/CD automation
- Files: 45+ source files
- Lines of Code: ~8,000 (C++) + ~2,000 (Dart)
- Tests: 185 total (140 C++ + 45 Dart)
- Documentation: 1,200+ lines
- Build Configs: 8+ matrix combinations
- Build Issues: See
ADVANCED_BUILD.md - Test Failures: See
RUNNING_TESTS.md - Configuration: See
CODE_AUDIT_REPORT.md - Implementation Details: See
IMPLEMENTATION_INDEX.md
Apache License 2.0 - See LICENSE file
- Joel Winarske (Creator & Maintainer)
Status: β
Production Ready
Last Updated: March 26, 2026
Version: 0.2.0