[PATCH 4/9] rust/bql: make bindings public

Paolo Bonzini posted 9 patches 2 months, 2 weeks ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
[PATCH 4/9] rust/bql: make bindings public
Posted by Paolo Bonzini 2 months, 2 weeks ago
For consistency with other crates.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/bql/src/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/bql/src/lib.rs b/rust/bql/src/lib.rs
index ef08221e9c1..2cdc551e21e 100644
--- a/rust/bql/src/lib.rs
+++ b/rust/bql/src/lib.rs
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
-mod bindings;
+pub mod bindings;
 use bindings::{bql_block_unlock, bql_locked, rust_bql_mock_lock};
 
 mod cell;
-- 
2.51.1
Re: [PATCH 4/9] rust/bql: make bindings public
Posted by Zhao Liu 2 months, 1 week ago
On Thu, Nov 27, 2025 at 02:20:31PM +0100, Paolo Bonzini wrote:
> Date: Thu, 27 Nov 2025 14:20:31 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH 4/9] rust/bql: make bindings public
> X-Mailer: git-send-email 2.51.1
> 
> For consistency with other crates.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/bql/src/lib.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Other crates appear to require being public mods to ensure binding
compilation succeeds or to use raw binding in somewhere, but currently
bql's raw binding hasn't been used anywhere.

I think maybe it's better to keep this mod as private until someone
needs it. This helps justify whether raw binding is truly necessary.
Direct binding uses should be minimized if possible.

Thanks,
Zhao