Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d383299 authored by Joel Galenson's avatar Joel Galenson
Browse files

Add Rust bindings

We currently only need these few symbols.

Test: Use them from Rust.
Fixes: 175619259
Change-Id: I0c2ca708c5a6ab550af7103754db775ffbca245b
parent 2686ce88
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -354,3 +354,17 @@ cc_test {
    defaults: ["libcutils_test_static_defaults"],
    test_config: "KernelLibcutilsTest.xml",
}

rust_bindgen {
    name: "libcutils_bindgen",
    wrapper_src: "rust/cutils.h",
    crate_name: "cutils_bindgen",
    source_stem: "bindings",
    local_include_dirs: ["include"],
    bindgen_flags: [
        "--whitelist-function", "multiuser_get_app_id",
        "--whitelist-function", "multiuser_get_user_id",
        "--whitelist-function", "multiuser_get_uid",
        "--whitelist-var", "AID_USER_OFFSET",
    ],
}
+4 −0
Original line number Diff line number Diff line
#pragma once

#include <cutils/multiuser.h>
#include <private/android_filesystem_config.h>