summaryrefslogtreecommitdiffstats
path: root/ipfs-api/examples/pubsub.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ipfs-api/examples/pubsub.rs')
-rw-r--r--ipfs-api/examples/pubsub.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipfs-api/examples/pubsub.rs b/ipfs-api/examples/pubsub.rs
index 16b674e..bed0aae 100644
--- a/ipfs-api/examples/pubsub.rs
+++ b/ipfs-api/examples/pubsub.rs
@@ -25,7 +25,8 @@ fn get_client() -> IpfsClient {
// Creates an Ipfs client, and simultaneously publishes and reads from a pubsub
// topic.
//
-#[tokio::main]
+#[cfg_attr(feature = "actix", actix_rt::main)]
+#[cfg_attr(feature = "hyper", tokio::main)]
async fn main() {
eprintln!("note: ipfs must be run with the --enable-pubsub-experiment flag");