Commit graph

6 commits

Author SHA1 Message Date
Mark Punzalan
5529e36e88 Add a nano proto version of aconfig protos
Framework already has nano protos, and reusing them won't
introduce extra dependencies for the apps
This is setting up the resources flagging in the framework

Bug: 297373084
Test: Built with related changes
Change-Id: I518bd56f56c42e0adef0002e95f8948e0904fb43
2024-05-15 06:18:23 +00:00
Zhi Dou
2d2610c787 aconfig_proto: add document for container filed
Test: n/a
Bug: 328027300
Change-Id: Ieec2c24cb9024f429fcd7888ef6c7c89d212ff63
2024-03-06 15:36:34 +00:00
Zhi Dou
d43b446ebb aconfig_proto: add doc in aconfig.proto file
This change adds docs in aconfig.proto file and adds more detail in the
error message for bad package, name and namespace.

Bug: 318759389
Test: atest aconfig.test
Change-Id: I0d45495cd864506b2fcc06ad47e3ffbd6caca9fb
2024-02-05 16:41:56 +00:00
Mårten Kongstad
6fdaa11d7c aconfig: fix formatting warnings
Update the rust toolchain to 1.75.0 and run `cargo fmt`.

Bug: N/A
Test: cargo fmt --check
Test: atest :all
Change-Id: I718c350f4c346b85ff3608f3101278c2ee776b36
2024-01-31 09:40:21 +01:00
Dennis Shen
a4294b0c6a aconfig: create unit test targets for aconfig_protos and
aconfig_storage_file crate

also added a bunch of comments to satisfy android lint requirements

Bug: b/321077378
Test: atest aconfig.test, atest aconfig_protos.test, atest aconfig_storage_files.test
Change-Id: I9bce302ac3bc98c5347e5334d915e77337ee89c4
2024-01-25 17:33:36 +00:00
Dennis Shen
277e5dc36e Restructure aconfig repo to be a cargo workspace with many crates
Previously, aconfig repo is the root directory of aconfig binary crate,
but it also hosts printflags crate inside, and there is no cargo support
for printflags binary crate. In addition, with more aconfig development,
more crates are being added to this repo. Thus this repo should be
configured as a Cargo workspace with multiple crates rather than a
single crate.

Note the top level Cargo.toml file specifies the crates this workspace
carries:
(1) aconfig_protos: the proto library crate that will be used by many other
crates such as aconfig binary crate and printflags binary crate
(2) aconfig: the aconfig binary crate
(3) printflags: the printflags binary crate

(1) aconfig_protos crate setup:

Inside aconfig_protos dir we set up the aconfig_protos crate, the
previously src/proto.rs is now aconfig_protos/src/lib.rs, the build.rs
is carried over to this crate.

(2) aconfig binary crate setup:

Notice its Cargo.toml file claims package dependency on aconfig_protos
crate. It no longer carries proto related module and build.rs file.

(3) printflags binary crate setup:

Similary, notice that in its Cargo.toml file, it claims package
dependency on aconfig_protos crate.

With this setup, we can Cargo build/test each crate individually when
inside a specific crate dir. But we can also run Cargo build/test at
repo root level, which will build/test all the crates in this workplace.

This is the structuring cl. The next cl is to move storage modules into
its own library crate. This storage file library crate will be used by
both aconfig binary crate as well as flag read library crate (to be
created as another new crate here).

Bug: b/321984352
Test: top and individual crate dir level Cargo build/test, m each
individual targets

Change-Id: I75833f4997f7ee554ff6c1557df9ac87f62b2732
Merged-In: I75833f4997f7ee554ff6c1557df9ac87f62b2732
2024-01-24 02:18:52 +00:00