Kataglyphis-Inference-Engine
An inference engine with Flutter/Dart frontend and Rust/C++ backend, showcasing Gstreamer capabilities enhanced with AI. Read further if you are interested in cross platform AI inference.
Overview
Kataglyphis-Inference-Engine bundles a Flutter/Dart frontend, a Rust/C++ inference core, and a rich set of camera streaming pipelines powered by GStreamer. The repository acts as an end-to-end reference for building cross-platform inference products that target desktop, web, and embedded devices.
Highlights & Key Features โ Kataglyphis-Inference-Engine
๐ Highlights
- ๐จ GStreamer native GTK integration โ Leveraging users to write beautiful Linux AI inference apps.
- ๐น GStreamer WebRTC livestreaming with ready-to-use pipelines for USB, Raspberry Pi, and Orange Pi cameras.
- ๐ flutter_rust_bridge integration โ Ensures a seamless API boundary between Dart UI and Rust logic.
- ๐ณ Containerized development flow plus native instructions for Windows, Linux, web. For details in my build environment look into Kataglyphis-ContainerHub. On Windows the container engine is Stevedore and build containers run with
--isolation process(full host CPU count) โ see docs/source/platforms.md. - ๐ Python inference demos for rapid experimentation alongside the Rust core.
๐ Feature Status Matrix
Core Features
| Category | Feature | Win x64 | Linux x64 | Linux ARM64 | Linux RISC-V | Android |
|---|---|---|---|---|---|---|
| Camera Streaming | ๐น GStreamer WebRTC Livestream | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | N/A |
| ๐ง Local Webcam ONNX Inference (Rust) | โ๏ธ | ๐ถ | ๐ถ | ๐ถ | ๐ถ | |
| Supported Cameras | ๐ USB Devices | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | N/A |
| ๐ Raspberry Pi Camera | N/A | โ๏ธ | โ๏ธ | โ๏ธ | N/A | |
| ๐ Orange Pi Camera | N/A | โ | โ | โ | N/A | |
| ๐ฑ Native Camera API | N/A | N/A | N/A | N/A | โ๏ธ |
Infrastructure & Build
| Category | Feature | Win x64 | Linux x64 | Linux ARM64 | Linux RISC-V | Android |
|---|---|---|---|---|---|---|
| Containerization | ๐ณ Dockerfile | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | N/A |
| ๐ณ Docker Compose | N/A | โ๏ธ | โ๏ธ | โ๏ธ | N/A | |
| Native Integration | ๐จ GTK Integration | N/A | โ๏ธ | โ๏ธ | โ๏ธ | N/A |
| ๐ช Win32 API | โ๏ธ | N/A | N/A | N/A | N/A | |
| ๐ค Android NDK | N/A | N/A | N/A | N/A | โ๏ธ | |
| Bridge Layer | ๐ flutter_rust_bridge | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ |
| Compiler | ๐ง Clang-CL | โ๏ธ | N/A | N/A | N/A | N/A |
| ๐ง GCC/Clang | N/A | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ |
Testing & Quality Assurance
| Category | Feature | Win x64 | Linux x64 | Linux ARM64 | Linux RISC-V | Android |
|---|---|---|---|---|---|---|
| Unit Testing | ๐งช Advanced unit testing | ๐ถ | ๐ถ | ๐ถ | ๐ถ | ๐ถ |
| Performance | โก Advanced performance testing | ๐ถ | ๐ถ | ๐ถ | ๐ถ | ๐ถ |
| Security | ๐ Advanced fuzz testing | ๐ถ | ๐ถ | ๐ถ | ๐ถ | ๐ถ |
Frontend Platforms
| Category | Feature | Win x64 | Linux x64 | Linux ARM64 | Linux RISC-V | Android |
|---|---|---|---|---|---|---|
| Flutter UI | ๐ฆ Flutter Web Support | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ |
| ๐ป Flutter Desktop | โ๏ธ | โ๏ธ | โ๏ธ | โ๏ธ | N/A | |
| ๐ฑ Flutter Mobile | N/A | N/A | N/A | N/A | โ๏ธ |
Platform Summary
| Platform | Architecture | Status | Notes |
|---|---|---|---|
| ๐ช Windows | x86-64 | โ๏ธ | Built with clang-cl, Win32 integration |
| ๐ง Linux | x86-64 | โ๏ธ | Full GTK support, Docker ready |
| ๐ง Linux | ARM64 | โ๏ธ | SBC optimized (RPi, OPi support) |
| ๐ง Linux | RISC-V | โ๏ธ | Emerging architecture support |
| ๐ค Android | ARM64/x86-64 | โ๏ธ | Native camera, NDK integration |
Legend:
- โ๏ธ Completed - Feature fully implemented and tested
- ๐ถ In Progress - Active development underway
- โ Not Started - Planned but not yet begun
- N/A - Not applicable for this platform
Quick Start
- Clone the repository with submodules:
NOTE: On Windows I use Git Bash instead of
Powershell or cmd
git clone --recurse-submodules --branch develop git@github.com:Kataglyphis/Kataglyphis-Inference-Engine.git
cd Kataglyphis-Inference-Engine
- Initialize submodules if needed.
If u used--recurse-submoduleswhile cloning you are already good.
Otherwise you can use this :smile:git submodule update --init --recursive
Refer to the detailed docs below for platform-specific requirements, camera streaming pipelines, and deployment workflows.
-
Build the app. Every lane runs containerized, and local runs invoke the same script CI invokes โ the exact commands, presets and switches are in AGENTS.md ยง 4:
Lane What CI runs Locally Windows (amd64) scripts/windows/Build-Windows.ps1the same script, in the same image Linux native (amd64 / arm64) scripts/linux/ci/ci-container-run-native-linux.shInvoke-LinuxLane.ps1Android scripts/linux/ci/ci-container-run-android.shInvoke-LinuxLane.ps1 -Lane androidWeb scripts/linux/ci/ci-container-run-web-linux.shInvoke-LinuxLane.ps1 -Lane webThe Linux entries go through ContainerHub's
run-in-linux-containeraction in CI and Rancher Desktop'snerdctllocally; inside the container the two are identical, down to the argument list. Reproduce a CI failure locally before pushing โ that is the whole point of the arrangement.Note that the Linux
build_linuxstage runs a full CodeQL analysis onx64, not just a build โ see AGENTS.md before starting one.Building the Linux lane locally on a Windows host has host-side prerequisites โ Rancher Desktop's engine, the drive the repo lives on being visible to containerd's own mount namespace, and QEMU binfmt registered for an arm64 run. The concrete commands are in AGENTS.md ยง 4, "The Linux lane, locally"; the reasoning behind them is ContainerHub's, in
rancher-desktop-linux-containers.md. Both prerequisites are lost on a VM restart, and skipping either is silent: you get a bind mount that resolves and is empty, or an arm64 container running x86-64 binaries.
Browse the API docs locally
Generate the site into doc/api, then serve it. Use the pub-activated
dartdoc, not the SDK-bundled dart doc: dartdoc 9.0.4 (bundled with
several Flutter SDKs, including the Windows build image) crashes on any Flutter
app with a _stripDocImports RangeError; โฅ 9.0.9 fixes it.
scripts/windows/Build-Windows.ps1 already does this for you as its
"Generate API Docs" step (skip it with -SkipDocs); the commands below are for
generating and serving the site by hand.
dart pub global activate dartdoc # pulls >= 9.0.9
dart pub global run dartdoc --output doc/api
dart pub global activate dhttpd
export PATH="$PATH:$HOME/.pub-cache/bin"
dhttpd --path doc/api --host 127.0.0.1 --port 8080
On PowerShell the pub-cache bin goes on PATH differently:
$env:Path += ";$env:USERPROFILE\AppData\Local\Pub\Cache\bin"
Then open 127.0.0.1:8080.
Documentation
| Topic | Location | Description |
|---|---|---|
| Overview & architecture | docs/source/overview.md | What the project is, the architecture at a glance, and what each top-level directory holds. |
| Getting Started | docs/source/getting-started.md | Environment prerequisites, installation, and run commands. |
| Platform Guides | docs/source/platforms.md | Container, Windows, Raspberry Pi, and web build instructions โ incl. the Windows container troubleshooting table (Dev Drive, pkg-config, rustup/Cargokit, Debug-preset pitfalls). |
| Agent / contributor guide | AGENTS.md | Build workflow, container pitfalls, and quality gates for coding agents and new contributors. |
| Camera Streaming | docs/source/camera-streaming.md | GStreamer WebRTC pipelines and Python inference demos. |
| Upgrade guide | docs/source/upgrade-guide.md | How to keep things up-to-date. |
Build the full documentation website with dart pub global run dartdoc (see the note above โ not the SDK-bundled dart doc). The generated site in doc/api now includes the guides from docs/source.
Tests
Testing infrastructure is under active development. Track progress on the roadmap or contribute test plans via pull requests.
Roadmap
Upcoming features and improvements will be documented in this repository.
Please have a look docs/source/roadmap.md for more deetails.
Contributing
Contributions are what make the open-source community amazing. Any contributions are greatly appreciated.
- Fork the project.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
License
MIT (see here)
Acknowledgements
Thanks to the open-source community and all contributors!
Literature
Helpful tutorials, documentation, and resources:
Multimedia
Rust
Raspberry Pi
CMake/C++
Flutter/Dart
Protocols
Tooling
Android
Contact
Jonas Heinle
Twitter: @Cataglyphis_
Email: cataglyphis@jonasheinle.de
Project Links:
- GitHub: Kataglyphis-Inference-Engine
- Homepage: Official Site
Libraries
- blog_dependent_app_attributes
- blog_page_config
- js/gstwebrtc_api_interop
- l10n/app_localizations
- l10n/app_localizations_de
- l10n/app_localizations_en
- main
- my_two_cents_config
- Pages/AboutMePage/about_me_page
- Pages/AboutMePage/Widgets/about_me_table
- Pages/AboutMePage/Widgets/donation
- Pages/AboutMePage/Widgets/perfect_day_chart
- Pages/AboutMePage/Widgets/skill_table
- Pages/AboutMePage/Widgets/sqlite3_healthcheck_widget
- Pages/Blog/blog_page
- Pages/blog_dependent_screen_configurations
- Pages/DataPage/BlockOverviewPage/block_entry
- Pages/DataPage/BlockOverviewPage/block_entry_list
- Pages/DataPage/BlockOverviewPage/block_overview_page
- Pages/DataPage/BlockOverviewPage/block_overview_page_config
- Pages/DataPage/media_critics_page
- Pages/ErrorPage/error_page
- Pages/ErrorPage/error_page_stateful_branch_info_provider
- Pages/ErrorPage/error_page_widget
- Pages/Footer/Pages/configs/privacy_policy_config
- Pages/Home/home_config
- Pages/jotrockenmitlocken_screen_configurations
- Pages/LandingPage/landing_page
- Pages/shared/markdown_content_page
- Pages/StreamPage/rust_webcam_view
- Pages/StreamPage/stream_page
- Pages/StreamPage/webrtc_view
- Pages/StreamPage/webrtc_view_stub
- Routing/jotrockenmitlocken_router
- settings/webrtc_settings
- WebRTC and video streaming configuration settings.
- utils/locale_utils