From 10f9e85ab58bdac759239e2e80bc99badea72942 Mon Sep 17 00:00:00 2001 From: Adam Hupp Date: Mon, 10 Feb 2025 22:36:17 +0000 Subject: [PATCH] Make biscuit_auth module init function pub We have python bindings to both the stock biscuit-auth crate, as well as our own rust crate that depends on biscuit-auth. In order for these to interoperate they all need to be linked together into a single shared library. (Or at least, that was the safest way I could find to do it). AFAICT python requires that the shared library name match the module name, so it will not call the module init function in this case. This PR makes the `biscuit_auth` module init function `pub` so it can be called from another crate's module init function. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index d222dd5..7763a14 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1273,7 +1273,7 @@ impl PyUnverifiedBiscuit { /// Main module for the biscuit_auth lib #[pymodule] -fn biscuit_auth(py: Python, m: &Bound) -> PyResult<()> { +pub fn biscuit_auth(py: Python, m: &Bound) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?;