commit 0cebbf9d5ddddf81b364fc40a97cc6e058bd09b1 Author: Yiyao Yu Date: Sat Apr 3 23:32:34 2021 -0400 Initial commit: project setup diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ef6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d8301c1 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "rustmp" +version = "0.1.0" +authors = ["Yiyao Yu "] +edition = "2018" + +[lib] +proc-macro = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/README.md b/README.md new file mode 100644 index 0000000..e73ca65 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +RustMP +====== + +Placeholder for RustMP README + diff --git a/src/bin/test_simple.rs b/src/bin/test_simple.rs new file mode 100644 index 0000000..89e166d --- /dev/null +++ b/src/bin/test_simple.rs @@ -0,0 +1,12 @@ +use rustmp::rmp_parallel_for; + +fn main() { + #[rmp_parallel_for] + fn inner() { + for i in 1..10 { + println!("Hello from {}!", i); + } + } + + inner(); +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..b3bf305 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,7 @@ +use proc_macro::TokenStream; + +#[proc_macro_attribute] +pub fn rmp_parallel_for(args: TokenStream, func: TokenStream) -> TokenStream { + func +} +