Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md


compio-macros

MIT licensed crates.io docs.rs Check Test

Procedural macros for compio.

This crate provides convenience macros for working with the compio runtime, making it easier to write async applications.

Macros

  • #[compio::main] - Marks an async function as the entry point, setting up the compio runtime
  • #[compio::test] - Marks an async function as a test, running it on a compio runtime

Usage

Both main and test are re-exported in compio crate when macros feature is enabled:

cargo add compio --features macros

Example:

#[compio::main]
async fn main() {
    println!("Hello from compio!");
}