MCPcopy Index your code
hub / github.com/RallyPat/LibreTune

github.com/RallyPat/LibreTune @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,736 symbols 6,495 edges 371 files 688 documented · 25%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LibreTune

License: GPL v2 CI Release Nightly

Modern, open-source ECU tuning software for Speeduino, rusEFI, epicEFI, and other INI-compatible aftermarket engine control units. Built with a Rust core and a native desktop UI via Tauri.

⚠️ Project status — early days. These notes are largely agentically written and may not be 100% accurate. Public contributions are welcome — see CONTRIBUTING.md and the CHANGELOG for what's landed recently.

Downloads

Platform Stable Release Nightly Build Notes
Linux No Stable releases at this time, please use the nightly. Nightly AppImage is portable, no install needed
Windows No Stable releases at this time, please use the nightly. Portable EXE Nightly is portable, no install needed
macOS No Stable releases at this time, please use the nightly. Nightly Separate builds for Apple Silicon and Intel

⚠️ Nightly builds are automatically generated from the latest code and may be unstable.

LibreTune Table Editor

Features

Table Editing

Full-featured 2D grid editor with 3D surface visualization, keyboard navigation, and live ECU cursor tracking. Includes Set Equal, Scale, Interpolate, Smooth, Re-bin, Copy/Paste, table comparison, and direct Burn to ECU.

Dashboards & Gauges

Import existing .dash files or build layouts from scratch with 13 gauge types (analog dials, bar gauges, sweep gauges, digital readouts, line graphs, histograms, tachometers, and more). Drag-and-drop designer mode with three default dashboards included.

AutoTune

Live fuel table recommendations based on AFR targets with heat map visualization, cell locking, authority limits, transient filtering, and lambda delay compensation.

Diagnostics & Logging

Data logger with configurable sample rates, playback controls, CSV import/export, math channels, and alert rules. Tooth logger and composite logger for trigger pattern analysis. Text-based ECU console for rusEFI/FOME/epicEFI.

Data Management

Project-based workflow with restore points, Git-based tune versioning, CSV export/import, TunerStudio project import, INI version tracking with automatic tune migration, and change annotations. Online INI search from Speeduino and rusEFI GitHub repos.

Additional

  • Multi-monitor: Pop out any tab to its own window with bidirectional sync
  • Unit preferences: Temperature (°C/°F/K), pressure (kPa/PSI/bar/inHg), AFR/Lambda
  • Performance calculator: Estimated HP/torque curves and acceleration times
  • Action scripting: Record and replay tuning actions across tunes, with INI-backed validation
  • Extensible: WASM plugin system with sandboxing and permission model
  • Localization: i18n scaffold with English and Brazilian Portuguese (pt-BR); add new locales under crates/libretune-app/src/i18n/locales/
  • Demo mode: Run the app without an ECU using the bundled simulator (Settings → Enable Demo Mode)

For full documentation, see the User Manual or the architecture overview.

Screenshots

Welcome Screen Settings Dialog Table Editor
Welcome Settings Table Editor

Supported ECUs

ECU INI Support Serial Protocol
Speeduino
rusEFI
FOME
epicEFI
MegaSquirt MS2/MS3 Partial

Any ECU using the standard INI definition format should be compatible.

Quick Start

Prerequisites

  • Rust (stable) — Install via rustup
  • Node.js 20+ — For the Tauri frontend
  • Platform build deps — see the OS notes below

Build & Run

git clone https://github.com/RallyPat/LibreTune.git
cd LibreTune

cd crates/libretune-app
npm install
npm run tauri dev

Notes for Linux Users

Tauri 2 needs WebKitGTK and a few system libraries. On Debian/Ubuntu:

sudo apt install -y libwebkit2gtk-4.1-dev librsvg2-dev libssl-dev \
  build-essential curl wget file libxdo-dev libayatana-appindicator3-dev

On Fedora:

sudo dnf install -y webkit2gtk4.1-devel openssl-devel curl wget file \
  libxdo-devel libappindicator-gtk3-devel librsvg2-devel "@C Development Tools and Libraries"

See the Tauri prerequisites guide for other distros.

Notes for Windows Users

If link.exe is not found, install the Visual Studio Build Tools:

  1. Download from visualstudio.microsoft.com/downloads → "Tools for Visual Studio" → "Build Tools for Visual Studio"
  2. During installation, enable Desktop development with C++
  3. Set the Rust toolchain: rustup default stable-x86_64-pc-windows-msvc
  4. Restart your terminal, then build as above

Notes for macOS Users

Install the Xcode command-line tools:

xcode-select --install

WebKit ships with macOS, so no extra system packages are required.

Build for Production

cd crates/libretune-app
npm run tauri build

Project Structure

libretune/
├── crates/
│   ├── libretune-core/         # Core Rust library
│   │   └── src/
│   │       ├── ini/            # INI file parsing
│   │       ├── protocol/       # Serial communication
│   │       ├── ecu/            # ECU memory model
│   │       ├── datalog/        # Data logging
│   │       ├── autotune/       # AutoTune algorithms
│   │       ├── tune/           # Tune file management
│   │       ├── dash/           # Dashboard format (incl. layout.rs defaults)
│   │       └── project/        # Project, restore points, Git versioning
│   └── libretune-app/          # Tauri desktop application
│       ├── src/                # React frontend (TypeScript)
│       │   ├── components/     # UI (dialogs, dashboards, gauges, tuner-ui, …)
│       │   ├── contexts/       # Cross-cutting React providers
│       │   ├── hooks/          # Reusable hooks (realtime, ECU events, …)
│       │   ├── i18n/           # Localization (en, pt-BR)
│       │   └── stores/         # State stores
│       └── src-tauri/          # Tauri backend (Rust)
│           └── src/
│               ├── commands/   # Tauri commands (~70 sub-modules)
│               └── state.rs    # Shared AppState
├── docs/                       # User manual (mdBook) + architecture.md
├── scripts/                    # Build and development scripts
├── CHANGELOG.md                # Keep-a-Changelog history
└── Cargo.toml                  # Workspace root

For a deeper dive into module boundaries and Phase 1–8 cleanup history, see docs/architecture.md and CHANGELOG.md.

Development

See CONTRIBUTING.md for development setup and guidelines, and docs/architecture.md for a tour of the codebase.

Tests

# Rust workspace
cargo test --workspace

# Frontend (vitest)
cd crates/libretune-app && npm run test:run

Lints & type checks

cargo clippy --workspace --all-targets -- -D warnings
cargo fmt --all -- --check

cd crates/libretune-app
npm run typecheck

The full pre-push pipeline (build + tests + clippy + fmt + frontend build/tests) is wrapped in scripts/pre-push.sh and runs automatically as a Git hook.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

See LICENSE for the full license text.

Contributing

Contributions are welcome! Please read CONTRIBUTING.md before submitting PRs.

Acknowledgments

LibreTune is an independent open-source project and is not affiliated with EFI Analytics.

Extension points exported contracts — how you extend this code

CommunicationChannel (Interface)
Abstraction for communication channels (Serial or TCP) [3 implementers]
crates/libretune-core/src/protocol/stream.rs
RegionHealth (Interface)
Region health score from the backend
crates/libretune-app/src/components/tuner-ui/TuneHealth.tsx
TuneHealthReport (Interface)
Full health report from get_tune_health_report
crates/libretune-app/src/components/tuner-ui/TuneHealth.tsx
TuneAnomaly (Interface)
Anomaly from get_tune_anomalies
crates/libretune-app/src/components/tuner-ui/TuneHealth.tsx
PredictedCell (Interface)
Predicted cell from get_predicted_fills
crates/libretune-app/src/components/tuner-ui/TuneHealth.tsx
AutoTuneSettings (Interface)
* AutoTune session settings.
crates/libretune-app/src/components/tuner-ui/AutoTune.tsx

Core symbols most depended-on inside this repo

get
called by 305
crates/libretune-core/src/project/repository.rs
len
called by 233
crates/libretune-core/src/datalog/dyno.rs
parse
called by 184
crates/libretune-core/src/ini/expression.rs
contains
called by 149
crates/libretune-core/src/project/properties.rs
error
called by 148
crates/libretune-core/src/plugin_api.rs
is_empty
called by 142
crates/libretune-core/src/datalog/dyno.rs
len
called by 128
crates/libretune-core/src/ini/inc_tables.rs
tsColorToHex
called by 92
crates/libretune-app/src/components/dashboards/dashTypes.ts

Shape

Function 1,633
Method 549
Interface 281
Class 212
Enum 61

Languages

Rust66%
TypeScript34%

Modules by API surface

crates/libretune-core/src/ini/parser.rs78 symbols
crates/libretune-core/src/protocol/connection.rs72 symbols
crates/libretune-core/src/ini/types.rs70 symbols
crates/libretune-core/src/ini/expression.rs52 symbols
crates/libretune-core/src/plugin_api.rs41 symbols
crates/libretune-app/src/components/tables/TableEditor2D.tsx38 symbols
crates/libretune-core/src/tune/file.rs35 symbols
crates/libretune-core/src/plugin_system.rs34 symbols
crates/libretune-core/src/project/properties.rs33 symbols
crates/libretune-core/src/dash/types.rs31 symbols
crates/libretune-app/src/utils/unitConversions.ts31 symbols
crates/libretune-core/src/project/project.rs29 symbols

For agents

$ claude mcp add LibreTune \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact