go-LIN is a modern, Go-native LIN bus library for automotive, industrial, and embedded domains.
The project focuses on:
- A clean, stable
lin.Bus/lin.MasterBusinterface with swappable transports - Pure Go — no CGo, no native dependencies beyond optional serial I/O
- Safety-oriented design with go-FuSa annotations and E2E protection
- Standards compliance: LIN 2.x, LDF parsing, PID and checksum algorithms
- Testability by default via the in-process virtual bus
- Pure Go first
- Standards where they provide value (LIN 2.x, LDF, E2E)
- Simplicity over completeness
- Testability by default — virtual bus works everywhere
- Safety as a first-class concern
- Interface-first API — transports are always swappable
- Optional bridges — protocol adapters carry their own dependencies; core remains zero-dependency
| Version | Theme | Status |
|---|---|---|
| v0.1.0 | Core lin.Bus/MasterBus interfaces, virtual bus, LDF parser, master/slave nodes, E2E safety, CLI, Docker quickstart |
next |
| v0.2.0 | Serial/UART transport (transport/) — physical LIN on Linux via /dev/ttyS* |
planned |
| v0.3.0 | Diagnostic frames — master request (0x3C) and slave response (0x3D) handling | planned |
| v0.4.0 | Sleep/wakeup frame sequences — go-to-sleep command, wakeup pulse | planned |
| v0.5.0 | Sporadic frames — master selects which frame to transmit based on flags | planned |
| v0.6.0 | Event-triggered frames — multi-slave collision resolution | planned |
| v0.7.0 | LDF signal encoding (write direction) and value table support | planned |
| v0.8.0 | go-FuSa v0.30.0 → latest; coverage 80% across all packages | planned |
| v0.9.0 | Statistics — bus load, frame error counters, per-ID metrics | planned |
| v1.0.0 | API stability, full serial transport, documentation complete | planned |
| v1.1.0 | Bridge — CAN (bridge/can/) — LIN-over-CAN gateway (works with go-CAN) |
planned |
| v1.2.0 | Bridge — MQTT (bridge/mqtt/) — publish/subscribe LIN frames over MQTT |
planned |
| v1.3.0 | Bridge — DDS (bridge/dds/) — LIN frame distribution over DDS topics |
planned |
| v1.4.0 | Bridge — SOME/IP (bridge/someip/) — LIN frames as SOME/IP service events |
planned |
| v1.5.0 | Bridge — gRPC (bridge/grpc/) — stream LIN frames over gRPC |
planned |
lin.Framewith ID (6-bit), Data (1–8 bytes), Checksum, ChecksumTypelin.Filterwith exact-ID and all-frames matchinglin.Businterface (Publish, Subscribe, Close)lin.MasterBusextension (SendHeader)lin.ProtectID,lin.VerifyPID,lin.CalcChecksumlin.ValidateFrame
- Zero-dependency broadcast bus
- Simulates master/slave frame exchanges in-process
- Multiple subscribers with independent filter sets
- Drop-on-full-channel semantics
- Fuzz target for
SendHeader
- Protocol version, language version, baud rate
- Node declarations (master + slaves)
- Signal definitions (bit width, init value, publisher/subscribers)
- Frame definitions (ID, publisher, length, signal-to-bit-offset mappings)
- Schedule table parsing (frame name + delay)
- Signal decoder:
db.Decode(id, data) map[string]uint64 - Fuzz target for
Parse
- Schedule table execution (frame-ID + slot delay)
SendHeaderdrivingMasterBusOnFrameandOnErrorcallbacks- Context-cancellation support
- Response registration per frame ID
- Multiple IDs per slave
- Direct pass-through to
bus.Publish
- 10-byte protection header: DataID, SourceID, SequenceCounter, CRC-16/CCITT-FALSE
ProtectorandReceiverwrappers- Detects CRC mismatch, sequence gaps, and short headers
- Fuzz target for
ProtectUnwrap
send <id> <hex-data>— publish response and trigger one frame exchangedump— print all received frames to stdoutpid <id>— compute and display Protected Identifiercs <id> <hex-data>— compute and display enhanced checksum
- Multi-stage Dockerfile (builder → quickstart, builder → lintool)
- docker-compose.yml for zero-config demo
- Multi-arch images (linux/amd64, linux/arm64) published to GHCR