-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move rate_estimator out of cras/src/server/rust
BUG=b:372902037 TEST=devtools/rust_generate.py TEST=cargo build && SYSTEM_CRAS_RUST_LIB=$PWD/target/debug/libcras_rust.a bazel test --//:system_cras_rust //... TEST=bazel test //... TEST=FEATURES='test -usersandbox' emerge-amd64-generic cras_rust adhd TEST=bazel run //cras/server/rate_estimator:rate_estimator_test Change-Id: I92dc7330f98648e86732b141d40b870ef8b2f15d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5922502 Reviewed-by: Hung-Hsien Chen <hunghsienchen@chromium.org> Tested-by: Li-Yu Yu <aaronyu@google.com> Commit-Queue: Li-Yu Yu <aaronyu@google.com> Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com <chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com>
- Loading branch information
Showing
24 changed files
with
133 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2024 The ChromiumOS Authors | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
load("@crate_index//:defs.bzl", "all_crate_deps") | ||
load("@rules_cc//cc:defs.bzl", "cc_library") | ||
load("@rules_rust//rust:defs.bzl", "rust_test") | ||
load("//:utils.bzl", "require_no_config") | ||
load("//rules/cbindgen:rules.bzl", "cras_cbindgen") | ||
load("//rules/rust:defs.bzl", "cras_rust_library") | ||
|
||
cras_rust_library( | ||
name = "rate_estimator", | ||
srcs = glob( | ||
include = ["src/**/*.rs"], | ||
), | ||
crate_name = "cras_rate_estimator", | ||
edition = "2021", | ||
visibility = ["//visibility:public"], | ||
deps = all_crate_deps(normal = True), | ||
) | ||
|
||
rust_test( | ||
name = "rate_estimator_test", | ||
crate = ":rate_estimator", | ||
target_compatible_with = require_no_config("//:system_cras_rust_build"), | ||
) | ||
|
||
cras_cbindgen( | ||
name = "rate_estimator_h", | ||
srcs = ["src/rate_estimator_bindings.rs"], | ||
out = "rate_estimator.h", | ||
copyright_year = 2024, | ||
extra_args = [], | ||
) | ||
|
||
cc_library( | ||
name = "cc", | ||
hdrs = ["rate_estimator.h"], | ||
visibility = ["//visibility:public"], | ||
deps = [":rate_estimator"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "cras_rate_estimator" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
libc = { workspace = true } | ||
log = { workspace = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright 2024 The ChromiumOS Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
mod rate_estimator; | ||
pub mod rate_estimator_bindings; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters