#foreign-interface #protobuf #list #manager #ad-guard #outer

adguard-flm-ffi

Foreign function interface crate for filter list manager library

36 releases (15 stable)

2.3.5 Nov 20, 2025
2.2.0 Oct 8, 2025
2.0.0-rc.3 Jul 10, 2025
1.9.9 May 27, 2025
0.8.17 Nov 7, 2024

#1 in #outer

Download history 87/week @ 2025-10-21 3/week @ 2025-10-28 34/week @ 2025-11-04 74/week @ 2025-11-11 58/week @ 2025-11-18 133/week @ 2025-11-25 46/week @ 2025-12-02 34/week @ 2025-12-09 34/week @ 2025-12-16 53/week @ 2025-12-23 7/week @ 2025-12-30 9/week @ 2026-01-06 63/week @ 2026-01-13 27/week @ 2026-01-20 9/week @ 2026-02-03

107 downloads per month

Custom license

5.5MB
44K SLoC

C# 22K SLoC // 0.1% comments Rust 15K SLoC // 0.0% comments Swift 5K SLoC // 0.2% comments Kotlin 879 SLoC // 0.3% comments PowerShell 159 SLoC // 0.1% comments SQL 132 SLoC // 0.1% comments C++ 130 SLoC // 0.2% comments Shell 118 SLoC // 0.1% comments Batch 68 SLoC Visual Studio Solution 67 SLoC NuGet Config 20 SLoC

Contains (Windows DLL, 2MB) AdGuard.Utils.dll, (Windows DLL, 1MB) AdGuard.Utils.Base.dll, (JAR file, 60KB) gradle-wrapper.jar

FFI for AdGuard FLM

This crate is a set of bindings over filter-list-manager and build configurations for FFI bindings to interface with other programming languages.

FFI transport are implemented as C language interface (outer side) using protocol buffers for serialisation. On rust side (inner side) there is a dispatcher that passes the FFI function call to foreign language.

How to build

Re-generate protobuf and headers

You may need regenerate protobuf files for rust and flm_native_interface.h header:
cargo run -p ffi-native-assets-generator.
It's better run this operation from the workspace root.

Build library

cargo run -p adguard-flm-ffi from workspace root

Platforms

Apple Readme
Windows Readme

FFI-specific symbols

Look at these symbols for better understanding FFI interface.

Library facade

You can check rust facade here for library functions signatures.

Models

Source

Errors

OuterError - flattened enum from adguard_flm::FLMError.
Source

Dependencies

~36–53MB
~825K SLoC