Commit graph

11 commits

Author SHA1 Message Date
Luca Stefani
794a952642 Replace lazy_static with once_cell
Using lazy_static is now discouraged as unmaintained
and once_cell is the recommended replacement.

On top of that a similar implementation found in
once_cell is being tracked for inclusion under the
`lazy_cell` feature gate [0]

[0] https://github.com/rust-lang/rust/issues/109736

Test: m
Change-Id: I21d343a38dbd25bb2d13f239f7fa3a2d7f20323e
2024-01-22 18:47:38 +01:00
Andrew Walbran
f580fe5799 Add safety comments.
These will soon be required by a lint.

Bug: 290018030
Test: m rust
Change-Id: I0b25bcaa18d167fb9c2d63e637833d4935dc8ff4
2023-07-21 19:13:48 +01:00
Matthew Maurer
dee32db249 Bindgen 0.65.1 no longer supports size_t-is-usize
The flag has been a default, and now is not accepted.

Test: Treehugger, m rust
Bug: 279198502
Bug: 276464273
Change-Id: Ifdf9968bfcdb278f73cf31ab68bc6b488b39436b
2023-06-26 22:27:09 +00:00
Wayne Ma
8044045a1e Make libstatspull_bindgen available to resolv apex.
Test: m successed
Change-Id: Ia367ab5a87794c82238291b27a783278f319e767
2022-10-05 00:54:47 +08:00
Matthew Maurer
132a2b26b9 rust: Visibility exports for bindgen
We are now default restricting bindgen visibility to subpackages. This
change is part of a set of changes adding explicit visibility for
bindgen libraries which are already being used elsewhere.

* If these visibility rules are to allow access by the safe bindings
  library which lives elsewhere in the codebase, no action is needed.
* If safe bindings do not exist, and you own this library, now is a good
  time to think about producing them and transitioning your (now
  enumerated) client list.
* If safe bindings exist, but there is a surprise client of the raw
  bindings on this list, now is a good time to talk to them about why
  they don't want to use your safe bindings.

Bug: 166332519
Test: m
Change-Id: I1320a72d61cf0d760da3e037dec6ad35c8c979f8
2022-07-29 09:06:38 -07:00
Chris Wailes
96c9b1f423 Fix lints from Rust 1.60.0
Bug: 222737227
Test: m rust
Change-Id: Idd2c37516565950d82781b5cb05095548368d5fd
2022-04-19 17:25:32 -07:00
Shikha Panwar
03ac66e640 Make libstatspull_bindgen available to virt apex.
The library is required to log the atoms from virt apex. See bug for more details
Test: m succeeded. The whole topic is tested with statsd_testdrive 409
as mentioned in go/westworld-create-atom#step-3-test-your-atom

Change-Id: If8b13c9d1878265bfcb8e09fc1bd8e78e968f71f
2022-01-14 10:29:51 +00:00
Joel Galenson
30d4ab6167 Add bindgen bindings test
Note that this is currently a no-op test that does nothing.  But this
makes it future proof in case we add more later.

Test: atest
Change-Id: I23817febd2122f54c40958541fc66363d38b60ca
2021-08-23 13:46:03 -07:00
Joel Galenson
b453e63715 Use the new more inclusive command-line options.
Test: Compile
Change-Id: I31a33d5432470fb57edc17751536fe1ae98e6838
2021-04-19 09:15:01 -07:00
Bob Badour
8c2fe15b47 [LSC] Add LOCAL_LICENSE_KINDS to system/core
Added SPDX-license-identifier-Apache-2.0 to:
  libstats/pull_rust/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I362f72ab99850558ddc7b50108c1ec6a212cb258
2021-04-06 17:46:33 -07:00
Joel Galenson
559379ea58 Add Rust interface for the pull API.
Test: Manually run statsd_testdrive
Change-Id: Ib2e99ddbd60d054189caac712e0ae5438045f0bc
2021-03-31 14:41:24 -07:00