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

Commit 867a349e authored by Mårten Kongstad's avatar Mårten Kongstad
Browse files

aconfig: add project scaffolding

Introduce a new tool, aconfig, to manage build time configurations, such
as feature flags.

This CL adds a project skeleton. Later CLs will add the actual
implementation.

Note: there is no need for an explicit TEST_MAPPING file;
rust_test_host are automatically included in host-unit-tests and
explicitly adding these tests via TEST_MAPPING will cause an error.

Bug: 279485059
Test: m aconfig && aconfig
Test: atest aconfig.test
Change-Id: I94047a19a55ae4d45b4fd7a0c8105a91ddcdfd79
parent 0ab788ee
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
package {
    default_applicable_licenses: ["Android-Apache-2.0"],
}

rust_protobuf_host {
    name: "libaconfig_protos",
    protos: ["protos/aconfig.proto"],
    crate_name: "aconfig_protos",
    source_stem: "aconfig_protos",
    use_protobuf3: true,
}

rust_defaults {
    name: "aconfig.defaults",
    edition: "2021",
    clippy_lints: "android",
    lints: "android",
    srcs: ["src/main.rs"],
    rustlibs: [
        "libaconfig_protos",
        "libprotobuf",
    ],
}

rust_binary_host {
    name: "aconfig",
    defaults: ["aconfig.defaults"],
}

rust_test_host {
    name: "aconfig.test",
    defaults: ["aconfig.defaults"],
}
+0 −0

Empty file added.

tools/aconfig/OWNERS

0 → 100644
+5 −0
Original line number Diff line number Diff line
amhk@google.com
jham@google.com
joeo@google.com
opg@google.com
zhidou@google.com
+5 −0
Original line number Diff line number Diff line
[Builtin Hooks]
rustfmt = true

[Builtin Hooks Options]
rustfmt = --config-path=rustfmt.toml
+23 −0
Original line number Diff line number Diff line
// Copyright (C) 2023 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License

// Placeholder proto file. Will be replaced by actual contents.

syntax = "proto3";

package android.aconfig;

message Placeholder {
  string name = 1;
}
Loading