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

Skip to content
Commit 3cfbcf53 authored by Dennis Shen's avatar Dennis Shen
Browse files

aconfig: Rust codegen 2nd iteration

Introduce rust codegen 2nd iteration with unit test support. The design
is described in detail in the design doc (go/aconfig_rust_codegen). The general idea is to generate
different code with the same signature for production and test build
targets, just like java/c/cpp codegen.

We will have a FlagProvider struct that has flag methods implementation.
This flag provider instance can then be used in injection pattern. In
additon, we also generate top level functions that wraps around flag
provider call so it can be used in static function style.

Things to be decided later:

should we just generate one set of code, and use cfg! as compile
time marco to compile the right code for the right targets.

Bug: b/279483360
Test: atest aconfig.test
Change-Id: Ic75cedbd0d27b5242014c3ac7fc80692d2ab4589
parent 01332169
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment