VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
VLink

One minimalist API, 12 transports, zero-cost switching

Official website: https://vlink.work

Github: https://github.com/thun-res/vlink

English | ไธญๆ–‡

VLink is a lightweight C++ communication middleware for autonomous driving and embodied intelligence, positioned as a minimalist alternative to ROS 2.

A minimalist API (3โ€“5 lines to get communication going), zero-cost transport switching, and compile-time serialization deduction. Ships with 12 transports, 14 serialization formats, 3 communication models, 9 CLI tools, and optional Foxglove / Rerun visualization bridges.


๐Ÿ“š Documentation

Part I โ€” Getting Started

Documentation Content
Whitepaper Background, positioning, architecture & technical deep-dive
Build Guide CMake / Conan / Integration / Cross-platform
Examples Runnable samples (fastest on-ramp)

Part II โ€” Core Communication Models

Documentation Content
Event Model Publisher / Subscriber
Method Model Client / Server
Field Model Setter / Getter
Serialization 14 serialization types & auto-deduction

Part III โ€” Transport & Common Features

Documentation Content
Transport Backends 12 backends & URL format
QoS Quality of Service configuration
Zero-Copy CameraFrame / PointCloud (large-payload essentials)
Base Library Logger / MessageLoop / Timer / ThreadPool / Concurrency / IPC / Profiler
Bag Recording Bag / MCAP file format & API
CLI Tools 9 command-line tools reference
Environment Variables VLINK_* configuration reference

Part IV โ€” Tools & Visualization

Documentation Content
Viewer Qt desktop: Viewer / Player / Analyzer
WebViz vlink-foxglove / vlink-rerun bridges
Proxy ProxyServer / ProxyAPI
Discovery UDP multicast discovery & topology

Part V โ€” Advanced Topics

Documentation Content
Node Base Node base template shared interface & lifecycle (init/deinit/interrupt)
Security AES-128-CBC & custom encryption callbacks

Part VI โ€” Extension & Contribution

Documentation Content
C API C wrapper & multi-language FFI (six primitives, data plane)
Extensions Plugin system & custom transports
Testing doctest framework & gcov/lcov
PR Conventions Branches, commits, code style, CI gates

Quick Reference

Documentation Content
Cheatsheet Single-page API / URL / QoS / CLI / env-var reference
Troubleshooting Symptom-indexed problem solving
CHANGELOG Release notes

๐Ÿš€ 30-Second Tour

Quick Start
Publisher<Imu> pub("dds://sensor/imu"); // Cross-machine DDS
Publisher<Imu> pub("shm://sensor/imu"); // Same-host shared memory
Publisher<Imu> pub("intra://sensor/imu"); // In-process
Publisher<Imu> pub("dds://sensor/lidar?qos=sensor"); // QoS profile
Publisher<Imu> pub("shm://sensor/image?depth=10"); // History depth

URL syntax: Transport Backends.


๐Ÿ›๏ธ Architecture

VLink Architecture

๐ŸšŒ Transport Backends

Scheme Underlying Scope Zero-copy Status
intra:// Lock-free queue In-process โœ… โœ… Stable
shm:// Iceoryx Same-host IPC โœ… โœ… Stable
dds:// Fast-DDS Cross-machine โ€” โœ… Stable
ddsc:// CycloneDDS Cross-machine โ€” โœ… Stable
shm2:// Iceoryx2 Same-host โœ… ๐ŸŸก Beta
ddsr:// RTI Connext Cross-machine โ€” ๐ŸŸก Beta
ddst:// TravoDDS (domestic DDS) Cross-machine โ€” ๐ŸŸก Beta
zenoh:// Zenoh Cross-machine / cloud-edge โ€” ๐ŸŸก Beta
someip:// vsomeip Automotive Ethernet โ€” ๐ŸŸก Beta
mqtt:// Paho MQTT Cloud โ€” ๐ŸŸก Beta
fdbus:// FDBus Same-host โ€” ๐ŸŸก Beta
qnx:// QNX IPC Same-host (QNX) โ€” ๐ŸŸก Beta

๐Ÿ“ก Communication Models

Three Communication Models

Event โ€” Publish/Subscribe

Publisher<Imu> publisher("dds://sensor/imu");
publisher.publish(msg);
Subscriber<Imu> subscriber("dds://sensor/imu");
subscriber.listen([](const Imu& msg) { process(msg); });

Method โ€” Request/Response

Server<Req, Resp> server("dds://calc/add");
server.listen([](const Req& req, Resp& resp) {
resp.set_sum(req.left() + req.right());
});
Client<Req, Resp> client("dds://calc/add");
if (auto r = client.invoke(req, 3s)) { use(*r); } // Synchronous โ†’ std::optional<Resp>
client.invoke(req, [](const Resp& r) { use(r); }); // Async callback
auto future = client.async_invoke(req); // Future
Client<Req> fire("dds://event/notify"); // RespT defaults to EmptyType
fire.send(req); // Fire-and-forget (only when RespT = EmptyType)

Field โ€” State Synchronization

Setter<Status> setter("shm://vehicle/status");
setter.set(status); // New Getters automatically receive the latest value
Getter<Status> getter("shm://vehicle/status");
getter.listen([](auto& s) { use(s); });
getter.set_change_reporting(true); // Trigger only on value change

๐Ÿ”ง Getting Started (Build)

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
ctest --test-dir build --output-on-failure
sudo cmake --install build

CMake integration:

# Specific modules
find_package(vlink REQUIRED COMPONENTS shm dds)
target_link_libraries(my_app PRIVATE vlink::vlink vlink::shm vlink::dds)
# All modules
find_package(vlink REQUIRED COMPONENTS all)
target_link_libraries(my_app PRIVATE vlink::all)
# Generated proto targets
vlink_generate_cpp(TARGET example_gen PROTO example1.proto example2.proto)
target_link_libraries(my_app PRIVATE example_gen)

See the CMake target list and the full Build Guide for details.


๐Ÿ’ป Platform Support

Platform Architecture Compiler Status
Linux x86_64 / aarch64 GCC 9+ / Clang 10+ โœ… Stable
Windows 10+ x86_64 MSVC 2019+ / MinGW โœ… Stable
macOS 10.15+ x86_64 / arm64 AppleClang 12+ ๐ŸŸก Beta
Android aarch64 / x86_64 NDK Clang r25+ โœ… Stable
QNX 7.x/8.x aarch64 / x86_64 QCC (QNX SDP) โœ… Stable

๐Ÿ“ Project Structure

vlink/
โ”œโ”€โ”€ include/vlink/ Public headers (6 primitives + base + extensions + zerocopy)
โ”œโ”€โ”€ src/ Core library implementation
โ”œโ”€โ”€ modules/ 12 transport backend implementations
โ”œโ”€โ”€ cli/ 9 command-line tools
โ”œโ”€โ”€ proxy/ vlink-proxy executable + ProxyServer / ProxyAPI libraries
โ”œโ”€โ”€ viewer/ Qt desktop visualization tool (default OFF, requires ENABLE_VIEWER=ON)
โ”œโ”€โ”€ webviz/ vlink-foxglove / vlink-rerun bridge executables (default OFF)
โ”œโ”€โ”€ c_api/ C API (data plane only, for Python/Rust/etc. FFI)
โ”œโ”€โ”€ python_api/ nanobind Python bindings (default OFF, requires ENABLE_PYTHON_API=ON)
โ”œโ”€โ”€ examples/ Usage examples (default OFF, 14 categories)
โ”œโ”€โ”€ test/ doctest main test suite (vlink-test)
โ”œโ”€โ”€ doc/ Documentation
โ”œโ”€โ”€ tools/ Build, packaging, versioning helpers
โ”œโ”€โ”€ cmake/ CMake toolchains and Find modules
โ”œโ”€โ”€ thirdparty/ Third-party dependencies and patches
โ”œโ”€โ”€ packup/ Release packaging assets
โ”œโ”€โ”€ CMakeLists.txt Top-level CMake entry
โ”œโ”€โ”€ conanfile.py Conan recipe
โ””โ”€โ”€ Android.bp Android.bp (Soong build rules)

๐Ÿค Contributing

Pull requests are welcome. Please read the PR Conventions before opening a PR.


๐Ÿ“œ License

[Apache License 2.0](LICENSE) โ€” free for commercial use.

Copyright (C) 2026 Thun Lu. All rights reserved.

*Author: Thun Lu thun..nosp@m.lu@z.nosp@m.ohoma.nosp@m.il.c.nosp@m.n*