diff --git a/Cargo.toml b/Cargo.toml index dd826bf..092efff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ php-tokio = "0.1.4" [dev-dependencies] skeptic = "0.13" +reqwest = "0.11.22" [build-dependencies] anyhow = "1" diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 2ca6c5f..4108d1b 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -24,6 +24,7 @@ - [Class Object](./types/class_object.md) - [Closure](./types/closure.md) - [Functions & methods](./types/functions.md) + - [Async futures](./macros/impl.md#async) - [Macros](./macros/index.md) - [Module](./macros/module.md) - [Module Startup Function](./macros/module_startup.md) diff --git a/guide/src/macros/impl.md b/guide/src/macros/impl.md index e1adc50..61b0e70 100644 --- a/guide/src/macros/impl.md +++ b/guide/src/macros/impl.md @@ -213,6 +213,8 @@ pub extern "C" fn request_shutdown(_type: i32, _module_number: i32) -> i32 { pub fn get_module(module: ModuleBuilder) -> ModuleBuilder { module.request_shutdown_function(request_shutdown) } + +# fn main() {} ``` Here's the async PHP code we use to interact with the Rust class we just exposed.