fn walle(_py: Python, m: &PyModule) -> PyResult<()> {
    let env = tracing_subscriber::EnvFilter::from("Walle-core=trace");
    tracing_subscriber::fmt().with_env_filter(env).init();
    #[pyfn(m)]
    /// just build and run a onebot application
    fn run_onebot_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_core::app::StandardOneBot::new(
                walle_core::AppConfig::default(),
                Box::new(walle_core::DefaultHandler),
            )
            .arc();
            app.run().await.unwrap();
            Ok(PyOneBot(OBApp::V12(app)))
        })
    }
    #[pyfn(m)]
    /// just build and run a onebot11 application
    fn run_onebot11_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_v11::app::OneBot11::new(
                walle_core::AppConfig::default(),
                Box::new(walle_v11::DefaultHandler),
            )
            .arc();
            app.run().await.unwrap();
            Ok(PyOneBot(OBApp::V11(app)))
        })
    }
    #[pyfn(m)]
    /// just build and run a onebot11 application
    fn run_block_onebot11_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_v11::app::OneBot11::new(
                walle_core::AppConfig::default(),
                Box::new(walle_v11::DefaultHandler),
            )
            .arc();
            app.run_block().await.unwrap();
            Ok(())
        })
    }
    Ok(())
}
/// this is the main module of walle(a rusty libonebot)
this is the main module of walle(a rusty libonebot)
this is the main module of walle ( a rusty libonebot )
fn walle(_py: Python, m: &PyModule) -> PyResult<()> {
    let env = tracing_subscriber::EnvFilter::from("Walle-core=trace");
    tracing_subscriber::fmt().with_env_filter(env).init();
    #[pyfn(m)]
    /// just build and run a onebot application
    fn run_onebot_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_core::app::StandardOneBot::new(
                walle_core::AppConfig::default(),
                Box::new(walle_core::DefaultHandler),
            )
            .arc();
            app.run().await.unwrap();
            Ok(PyOneBot(OBApp::V12(app)))
        })
    }
    #[pyfn(m)]
    /// just build and run a onebot11 application
    fn run_onebot11_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_v11::app::OneBot11::new(
                walle_core::AppConfig::default(),
                Box::new(walle_v11::DefaultHandler),
            )
            .arc();
            app.run().await.unwrap();
            Ok(PyOneBot(OBApp::V11(app)))
        })
    }
    #[pyfn(m)]
    /// just build and run a onebot11 application
    fn run_block_onebot11_app(py: Python) -> PyResult<&PyAny> {
        pyo3_asyncio::tokio::future_into_py(py, async {
            let app = walle_v11::app::OneBot11::new(
                walle_core::AppConfig::default(),
                Box::new(walle_v11::DefaultHandler),
            )
            .arc();
            app.run_block().await.unwrap();
            Ok(())
        })
    }
    Ok(())
}
fn walle ( _py : Python , m : & PyModule ) -> PyResult < ( ) > { let env = tracing_subscriber :: EnvFilter :: from ( " " ) ; tracing_subscriber :: fmt ( ) . with_env_filter ( env ) . init ( ) ; # [ pyfn ( m ) ] /// just build and run a onebot application fn run_onebot_app ( py : Python ) -> PyResult < & PyAny > { pyo3_asyncio :: tokio :: future_into_py ( py , async { let app = walle_core :: app :: StandardOneBot :: new ( walle_core :: AppConfig :: default ( ) , Box :: new ( walle_core :: DefaultHandler ) , ) . arc ( ) ; app . run ( ) . await . unwrap ( ) ; Ok ( PyOneBot ( OBApp :: V12 ( app ) ) ) } ) } # [ pyfn ( m ) ] /// just build and run a onebot11 application fn run_onebot11_app ( py : Python ) -> PyResult < & PyAny > { pyo3_asyncio :: tokio :: future_into_py ( py , async { let app = walle_v11 :: app :: OneBot11 :: new ( walle_core :: AppConfig :: default ( ) , Box :: new ( walle_v11 :: DefaultHandler ) , ) . arc ( ) ; app . run ( ) . await . unwrap ( ) ; Ok ( PyOneBot ( OBApp :: V11 ( app ) ) ) } ) } # [ pyfn ( m ) ] /// just build and run a onebot11 application fn run_block_onebot11_app ( py : Python ) -> PyResult < & PyAny > { pyo3_asyncio :: tokio :: future_into_py ( py , async { let app = walle_v11 :: app :: OneBot11 :: new ( walle_core :: AppConfig :: default ( ) , Box :: new ( walle_v11 :: DefaultHandler ) , ) . arc ( ) ; app . run_block ( ) . await . unwrap ( ) ; Ok ( ( ) ) } ) } Ok ( ( ) ) }
this is the main module of walle(a rusty libonebot)
this is the main module of walle ( a rusty libonebot )
_py
Python
m
&PyModule
_py
Python
m
&PyModule