[rust] Split the `rust_logger` crate into smaller modules. [chromium/src : main]

0 views
Skip to first unread message

Łukasz Anforowicz (Gerrit)

unread,
Apr 1, 2026, 7:49:21 PM (4 days ago) Apr 1
to Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Daniel Cheng

Łukasz Anforowicz added 1 comment

Patchset-level comments
File-level comment, Patchset 14:
Łukasz Anforowicz . resolved

@dcheng, can you PTAL as one of `//base/OWNERS` (and as a Chrome Rust co-conspirator)? This CL mostly just moves stuff / shouldn't change the behavior. See the CL description for more details.

/cc @dloehr in case this helps with the discussions about what shape Rust stuff can/should have

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
Gerrit-Change-Number: 7696722
Gerrit-PatchSet: 14
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Devon Loehr <dlo...@google.com>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Apr 2026 23:49:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Apr 1, 2026, 11:02:25 PM (4 days ago) Apr 1
to Łukasz Anforowicz, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
Attention needed from Łukasz Anforowicz

Daniel Cheng voted and added 2 comments

Votes added by Daniel Cheng

Code-Review+1

2 comments

Patchset-level comments
File-level comment, Patchset 15 (Latest):
Daniel Cheng . resolved

LGTM; if we need to do more of these in the future, might be nice to break out each module into a separate CL for reviewability, though I know that's a bit annoying depending on the Gerrit workflow you use...

File base/logging/rust_logger/log_crate_integration.rs
Line 37, Patchset 15 (Latest): log::Level::Error => print_rust_log::LogSeverity::Error,
Daniel Cheng . resolved

Because things like this aren't quite identical and I need to stare harder at the change :)

Open in Gerrit

Related details

Attention is currently required from:
  • Łukasz Anforowicz
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
    Gerrit-Change-Number: 7696722
    Gerrit-PatchSet: 15
    Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-CC: Devon Loehr <dlo...@google.com>
    Gerrit-Attention: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 03:02:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Łukasz Anforowicz (Gerrit)

    unread,
    Apr 2, 2026, 10:43:22 AM (3 days ago) Apr 2
    to Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org

    Łukasz Anforowicz added 1 comment

    Patchset-level comments
    Daniel Cheng . resolved

    LGTM; if we need to do more of these in the future, might be nice to break out each module into a separate CL for reviewability, though I know that's a bit annoying depending on the Gerrit workflow you use...

    Łukasz Anforowicz

    Ack. I guess I could have first had a CL for introducing modules **within** the original `logger.rs` and then moving things to a new directory in a separate CL.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
    Gerrit-Change-Number: 7696722
    Gerrit-PatchSet: 15
    Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-CC: Devon Loehr <dlo...@google.com>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 14:43:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Łukasz Anforowicz (Gerrit)

    unread,
    Apr 2, 2026, 10:45:02 AM (3 days ago) Apr 2
    to Mohannad Farrag, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Mohannad Farrag

    Łukasz Anforowicz voted and added 1 comment

    Votes added by Łukasz Anforowicz

    Auto-Submit+1

    1 comment

    Patchset-level comments
    Łukasz Anforowicz . resolved

    @aymanm, can you PTAL at `//components/cronet/Android/dependencies.txt`?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mohannad Farrag
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
    Gerrit-Change-Number: 7696722
    Gerrit-PatchSet: 15
    Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Mohannad Farrag <aym...@google.com>
    Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-CC: Devon Loehr <dlo...@google.com>
    Gerrit-Attention: Mohannad Farrag <aym...@google.com>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 14:44:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mohannad Farrag (Gerrit)

    unread,
    Apr 2, 2026, 10:58:30 AM (3 days ago) Apr 2
    to Łukasz Anforowicz, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Łukasz Anforowicz

    Mohannad Farrag added 1 comment

    Patchset-level comments
    Łukasz Anforowicz . resolved

    @aymanm, can you PTAL at `//components/cronet/Android/dependencies.txt`?

    Mohannad Farrag

    I've started our gn2bp bot. This looks like a scary CL. I just want to see if it will choke on it or not. I'm unlikely to block you if it breaks, just want to see what is the result.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Łukasz Anforowicz
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
    Gerrit-Change-Number: 7696722
    Gerrit-PatchSet: 15
    Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Mohannad Farrag <aym...@google.com>
    Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-CC: Devon Loehr <dlo...@google.com>
    Gerrit-Attention: Łukasz Anforowicz <luk...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 14:58:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Łukasz Anforowicz <luk...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Łukasz Anforowicz (Gerrit)

    unread,
    Apr 2, 2026, 11:36:59 AM (3 days ago) Apr 2
    to Mohannad Farrag, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
    Attention needed from Mohannad Farrag

    Łukasz Anforowicz added 1 comment

    Patchset-level comments
    Łukasz Anforowicz . unresolved

    @aymanm, can you PTAL at `//components/cronet/Android/dependencies.txt`?

    Mohannad Farrag

    I've started our gn2bp bot. This looks like a scary CL. I just want to see if it will choke on it or not. I'm unlikely to block you if it breaks, just want to see what is the result.

    Łukasz Anforowicz

    What makes the CL scary / risky? FWIW the CL doesn't change which `gni` templates (e.g. `rust_static_library` or `rust_bindgen`) are used - it only moves them around a bit. OTOH I see that https://googleplex-android-review.git.corp.google.com/c/platform/external/cronet/+/39258778 did indeed fail some checks - e.g. https://android-build.corp.google.com/build_explorer/artifact_viewer/P120382460/cf_x86_64_wear-trunk_staging-userdebug/logs/build_error.log?attemptId=latest says:

    ```
    error: unexpected argument 'external/cronet/tot/base/logging/rust_logger/print_rust_log.rs' found

    Usage: cxxbridge <input>.rs              Emit .cc file for bridge to stdout
    cxxbridge <input>.rs --header Emit .h file for bridge to stdout
    cxxbridge --header Emit "rust/cxx.h" header to stdout
    ```

    It seems that gn2bp doesn't support multiple files being listed in `rust_static_library.cxx_bindings`.

    So, what are the next steps here?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mohannad Farrag
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
      Gerrit-Change-Number: 7696722
      Gerrit-PatchSet: 15
      Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Mohannad Farrag <aym...@google.com>
      Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
      Gerrit-CC: Devon Loehr <dlo...@google.com>
      Gerrit-Attention: Mohannad Farrag <aym...@google.com>
      Gerrit-Comment-Date: Thu, 02 Apr 2026 15:36:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Łukasz Anforowicz <luk...@chromium.org>
      Comment-In-Reply-To: Mohannad Farrag <aym...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mohannad Farrag (Gerrit)

      unread,
      Apr 2, 2026, 12:38:26 PM (3 days ago) Apr 2
      to Łukasz Anforowicz, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from Łukasz Anforowicz

      Mohannad Farrag added 1 comment

      Patchset-level comments
      Łukasz Anforowicz . unresolved

      @aymanm, can you PTAL at `//components/cronet/Android/dependencies.txt`?

      Mohannad Farrag

      I've started our gn2bp bot. This looks like a scary CL. I just want to see if it will choke on it or not. I'm unlikely to block you if it breaks, just want to see what is the result.

      Łukasz Anforowicz

      What makes the CL scary / risky? FWIW the CL doesn't change which `gni` templates (e.g. `rust_static_library` or `rust_bindgen`) are used - it only moves them around a bit. OTOH I see that https://googleplex-android-review.git.corp.google.com/c/platform/external/cronet/+/39258778 did indeed fail some checks - e.g. https://android-build.corp.google.com/build_explorer/artifact_viewer/P120382460/cf_x86_64_wear-trunk_staging-userdebug/logs/build_error.log?attemptId=latest says:

      ```
      error: unexpected argument 'external/cronet/tot/base/logging/rust_logger/print_rust_log.rs' found

      Usage: cxxbridge <input>.rs              Emit .cc file for bridge to stdout
      cxxbridge <input>.rs --header Emit .h file for bridge to stdout
      cxxbridge --header Emit "rust/cxx.h" header to stdout
      ```

      It seems that gn2bp doesn't support multiple files being listed in `rust_static_library.cxx_bindings`.

      So, what are the next steps here?

      Mohannad Farrag

      Yeah. This is a bug in GN2BP that we should fix. Let me ask, how pressing is this CL so I can evaluate the risk of fixing forward or just hold until we fix GN2BP to support multiple files (should be relatively straightforward).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Łukasz Anforowicz
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
      Gerrit-Change-Number: 7696722
      Gerrit-PatchSet: 15
      Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Mohannad Farrag <aym...@google.com>
      Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
      Gerrit-CC: Devon Loehr <dlo...@google.com>
      Gerrit-Attention: Łukasz Anforowicz <luk...@chromium.org>
      Gerrit-Comment-Date: Thu, 02 Apr 2026 16:38:07 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Mohannad Farrag (Gerrit)

      unread,
      Apr 2, 2026, 1:02:18 PM (3 days ago) Apr 2
      to Łukasz Anforowicz, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from Łukasz Anforowicz

      Mohannad Farrag added 1 comment

      Patchset-level comments
      Łukasz Anforowicz . unresolved

      @aymanm, can you PTAL at `//components/cronet/Android/dependencies.txt`?

      Mohannad Farrag

      I've started our gn2bp bot. This looks like a scary CL. I just want to see if it will choke on it or not. I'm unlikely to block you if it breaks, just want to see what is the result.

      Łukasz Anforowicz

      What makes the CL scary / risky? FWIW the CL doesn't change which `gni` templates (e.g. `rust_static_library` or `rust_bindgen`) are used - it only moves them around a bit. OTOH I see that https://googleplex-android-review.git.corp.google.com/c/platform/external/cronet/+/39258778 did indeed fail some checks - e.g. https://android-build.corp.google.com/build_explorer/artifact_viewer/P120382460/cf_x86_64_wear-trunk_staging-userdebug/logs/build_error.log?attemptId=latest says:

      ```
      error: unexpected argument 'external/cronet/tot/base/logging/rust_logger/print_rust_log.rs' found

      Usage: cxxbridge <input>.rs              Emit .cc file for bridge to stdout
      cxxbridge <input>.rs --header Emit .h file for bridge to stdout
      cxxbridge --header Emit "rust/cxx.h" header to stdout
      ```

      It seems that gn2bp doesn't support multiple files being listed in `rust_static_library.cxx_bindings`.

      So, what are the next steps here?

      Mohannad Farrag

      Yeah. This is a bug in GN2BP that we should fix. Let me ask, how pressing is this CL so I can evaluate the risk of fixing forward or just hold until we fix GN2BP to support multiple files (should be relatively straightforward).

      Mohannad Farrag

      I've created https://crrev.com/c/7726224 which potentially should fix this issue. I'll run presubmit on it. If it passes then I'll merge it with your CL and both can be submitted.

      Gerrit-Comment-Date: Thu, 02 Apr 2026 17:02:04 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Łukasz Anforowicz (Gerrit)

      unread,
      Apr 3, 2026, 2:30:25 PM (2 days ago) Apr 3
      to Mohannad Farrag, Daniel Cheng, Devon Loehr, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, net-r...@chromium.org
      Attention needed from Mohannad Farrag

      Łukasz Anforowicz voted and added 1 comment

      Votes added by Łukasz Anforowicz

      Auto-Submit+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 16 (Latest):
      Łukasz Anforowicz . resolved

      Thanks @aymanm for updating `components/cronet/gn2bp/gen_android_bp.py` for this CL. Can you PTAL and add the CR+1 stamp if everything looks good to you?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Mohannad Farrag
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I0d79a0a7dd53aac63978caf54bb6e538406d00a4
        Gerrit-Change-Number: 7696722
        Gerrit-PatchSet: 16
        Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Mohannad Farrag <aym...@google.com>
        Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
        Gerrit-CC: Devon Loehr <dlo...@google.com>
        Gerrit-Attention: Mohannad Farrag <aym...@google.com>
        Gerrit-Comment-Date: Fri, 03 Apr 2026 18:30:18 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages