72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
//
|
|
// Copyright (C) 2021 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.
|
|
|
|
// Autogenerate the class (and respective headers) with logging methods and constants
|
|
package {
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
|
}
|
|
|
|
genrule {
|
|
name: "statslog_virtualization_header.rs",
|
|
tools: ["stats-log-api-gen"],
|
|
cmd: "$(location stats-log-api-gen) --module virtualizationservice --minApiLevel 34 --rustHeader $(genDir)/statslog_virtualization_header.rs --rustHeaderCrate statslog_virtualization_rust_header",
|
|
out: [
|
|
"statslog_virtualization_header.rs",
|
|
],
|
|
}
|
|
|
|
rust_library {
|
|
name: "libstatslog_virtualization_rust_header",
|
|
crate_name: "statslog_virtualization_rust_header",
|
|
srcs: [
|
|
"statslog_header_wrapper.rs",
|
|
":statslog_virtualization_header.rs",
|
|
],
|
|
rustlibs: [
|
|
"libstatspull_bindgen",
|
|
"libthiserror",
|
|
],
|
|
apex_available: [
|
|
"com.android.virt",
|
|
],
|
|
|
|
}
|
|
|
|
genrule {
|
|
name: "statslog_virtualization.rs",
|
|
tools: ["stats-log-api-gen"],
|
|
cmd: "$(location stats-log-api-gen) --module virtualizationservice --minApiLevel 34 --rustHeaderCrate statslog_virtualization_rust_header --rust $(genDir)/statslog_virtualization.rs",
|
|
out: [
|
|
"statslog_virtualization.rs",
|
|
],
|
|
}
|
|
|
|
rust_library {
|
|
name: "libstatslog_virtualization_rust",
|
|
crate_name: "statslog_virtualization_rust",
|
|
srcs: [
|
|
"statslog_wrapper.rs",
|
|
":statslog_virtualization.rs",
|
|
],
|
|
rustlibs: [
|
|
"libstatslog_virtualization_rust_header",
|
|
"libstatspull_bindgen",
|
|
],
|
|
apex_available: [
|
|
"com.android.virt",
|
|
],
|
|
|
|
}
|