20 releases (3 stable)

new 1.1.16 Dec 11, 2024
1.1.1 Nov 18, 2024
0.8.17 Nov 7, 2024

#941 in Development tools

Download history 282/week @ 2024-08-26 490/week @ 2024-09-02 144/week @ 2024-09-09 148/week @ 2024-09-16 383/week @ 2024-09-23 25/week @ 2024-09-30 283/week @ 2024-10-07 38/week @ 2024-10-14 188/week @ 2024-10-21 251/week @ 2024-10-28 294/week @ 2024-11-04 8/week @ 2024-11-11 183/week @ 2024-11-18 9/week @ 2024-11-25 189/week @ 2024-12-02 218/week @ 2024-12-09

600 downloads per month

Custom license

4.5MB
29K SLoC

C# 18K SLoC // 0.1% comments Rust 11K SLoC // 0.0% comments SQL 108 SLoC // 0.0% comments Visual Studio Solution 31 SLoC NuGet Config 16 SLoC PowerShell 4 SLoC

Contains (Windows DLL, 2MB) AdGuard.Utils.dll, (Windows DLL, 1MB) AdGuard.Utils.Base.dll

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.

There are currently two POSSIBLE ways to work with this library:

  1. Code generated by uniffi-rs
  2. C language interface using protocol buffers for serialisation (Preferred).

How to build

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.

Apple platforms

If you need to generate protobuf *.swift files:

platform/apple/Scripts/generate_proto.sh

This code will build a package compatible macOS, iOS, simulator.

platform/apple/Scripts/configure.sh
platform/apple/Scripts/build.sh

Windows

See readme for uniffi-based build on GitHub or protobuf-based here

FFI-specific symbols

Look at these symbols for better understanding FFI interface.

Protobuf interface

Native interface source C Header source

Functions

Top Level Functions source

Models

Source

Errors

OuterError - flattened enum from adguard_flm::FLMError.
Source

Dependencies

~40–54MB
~1M SLoC