# Libcanard v2.0 released

**URL:** <https://forum.opencyphal.org/t/libcanard-v2-0-released/1536>\
**Category:** Libcanard\
**Created:** [December 4, 2021, 9:05pm UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536 "2021-12-04T21:05:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 4, 2021, 9:05pm UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536/1 "2021-12-04T21:05:53Z")

</div>

The new version brings several major improvements:

- Dedicated transmission queues per redundant CAN interface with depth limits. The application is now expected to instantiate `CanardTxQueue` (or several in case of redundant transport) manually.

- Replace O(n) linked lists with fast O(log n) AVL trees ([Cavl](https://github.com/pavel-kirienko/cavl) library is distributed with libcanard). Traversing the list of RX subscriptions now requires recursive traversal of the tree.

- Manual DSDL serialization helpers removed (`canard_dsdl.h` / `canard_dsdl.c`); use [Nunavut](https://github.com/UAVCAN/nunavut) instead.

- Replace bitwise CRC computation with a much faster static table by default ([#185](https://github.com/UAVCAN/libcanard/issues/185)). This can be disabled by setting `CANARD_CRC_TABLE=0`, which is expected to save ca. 500 bytes of ROM.

- Fixed issues with const-correctness in the API ([#175](https://github.com/UAVCAN/libcanard/issues/175)).

- `canardRxAccept2()` renamed to `canardRxAccept()`.

- Support build configuration headers via `CANARD_CONFIG_HEADER`.

- Add API for generating CAN hardware acceptance filter configurations ([#169](https://github.com/UAVCAN/libcanard/issues/169)).

* * *

Usage examples adapted for the updated API are available in the README.

Special thanks to @coder_kalyan for critical contributions to this release.

> **[GitHub - UAVCAN/libcanard: A compact implementation of the UAVCAN/CAN protocol... - v2.0](https://github.com/UAVCAN/libcanard#v20)**
>
> A compact implementation of the UAVCAN/CAN protocol in C for high-integrity real-time embedded systems - GitHub - UAVCAN/libcanard: A compact implementation of the UAVCAN/CAN protocol in C for high...

---

<div class="post-metadata">

**Author:** ![coder\_kalyan](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/coder_kalyan/32/1361_2.png) [@coder\_kalyan](https://forum.opencyphal.org/u/coder_kalyan)\
**Post date:** [December 5, 2021, 12:47am UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536/2 "2021-12-05T00:47:06Z")

</div>

Additionally, a Docker container packaging the build toolchain is now available:

`cd docker/ && docker build -t libcanard . && cd ..`

After the container is built and tagged, use `./docker/run-docker.sh` followed by the toolchain command to run. For example:  
`mkdir build && ./docker/run-docker.sh cmake -B build tests/`

In the (hopefully near) future, the `libcanard` image will be published to dockerhub.

---

<div class="post-metadata">

**Author:** ![pepe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://forum.opencyphal.org/u/pepe)\
**Post date:** [December 7, 2021, 12:26pm UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536/3 "2021-12-07T12:26:34Z")

</div>

it is great to see a new version coming out! Is there a plan to release some minima examples?

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 7, 2021, 12:43pm UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536/4 "2021-12-07T12:43:12Z")

</div>

> [@pepe](#):
>
> Is there a plan to release some minima examples?

Minimal usage examples are already available in the README. That’s all we have right now but that should be sufficient to get started.

---

<div class="post-metadata">

**Author:** ![pepe](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/p/4da419/32.png) [@pepe](https://forum.opencyphal.org/u/pepe)\
**Post date:** [December 7, 2021, 12:52pm UTC](https://forum.opencyphal.org/t/libcanard-v2-0-released/1536/5 "2021-12-07T12:52:08Z")

</div>

Many thanks!
