From 0cebbf9d5ddddf81b364fc40a97cc6e058bd09b1 Mon Sep 17 00:00:00 2001 From: Yiyao Yu Date: Sat, 3 Apr 2021 23:32:34 -0400 Subject: [PATCH] Initial commit: project setup --- .gitignore | 2 ++ Cargo.toml | 12 ++++++++++++ README.md | 5 +++++ src/bin/test_simple.rs | 12 ++++++++++++ src/lib.rs | 7 +++++++ 5 files changed, 38 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 src/bin/test_simple.rs create mode 100644 src/lib.rs 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 +} +