File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,10 @@ jobs:
83
83
- name : Build
84
84
env :
85
85
EXT_PHP_RS_TEST : " "
86
- run : cargo build --release --features closure,anyhow --all
86
+ run : cargo build --release --features closure,anyhow,async --all
87
87
# Test & lint
88
88
- name : Test inline examples
89
- run : cargo test --release --all --features closure,anyhow
89
+ run : cargo test --release --all --features closure,anyhow,async
90
90
- name : Run rustfmt
91
91
if : matrix.rust == 'stable' && matrix.os == 'ubuntu-latest' && matrix.php == '8.2'
92
92
run : cargo fmt --all -- --check
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ zip = "0.6"
41
41
[features ]
42
42
closure = []
43
43
embed = []
44
+ async = []
44
45
45
46
[workspace ]
46
47
members = [" crates/macros" , " crates/cli" ]
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ pub mod prelude {
48
48
pub use crate :: php_extern;
49
49
pub use crate :: php_function;
50
50
pub use crate :: php_impl;
51
+ #[ cfg( any( docs, feature = "async" ) ) ]
51
52
pub use crate :: php_async_impl;
52
53
pub use crate :: php_module;
53
54
pub use crate :: php_print;
@@ -402,7 +403,7 @@ pub use ext_php_rs_derive::php_impl;
402
403
/// # Example
403
404
///
404
405
/// ```no_run
405
- /// # #![cfg(linux)) ]
406
+ /// # #![cfg(linux)]
406
407
/// # use ext_php_rs::prelude::*;
407
408
/// use php_tokio::EventLoop;
408
409
///
@@ -431,7 +432,10 @@ pub use ext_php_rs_derive::php_impl;
431
432
/// pub fn get_module(module: ModuleBuilder) -> ModuleBuilder {
432
433
/// module.request_shutdown_function(request_shutdown)
433
434
/// }
435
+ ///
436
+ /// pub fn main() {}
434
437
/// ```
438
+ #[ cfg( any( docs, feature = "async" ) ) ]
435
439
pub use php_tokio:: php_async_impl;
436
440
437
441
/// Annotates a function that will be used by PHP to retrieve information about
You can’t perform that action at this time.
0 commit comments