mirror of https://github.com/xythrez/RustMP.git
Initial commit: project setup
This commit is contained in:
commit
0cebbf9d5d
|
@ -0,0 +1,2 @@
|
|||
/target
|
||||
Cargo.lock
|
|
@ -0,0 +1,12 @@
|
|||
[package]
|
||||
name = "rustmp"
|
||||
version = "0.1.0"
|
||||
authors = ["Yiyao Yu <yuydevel@protonmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
|
@ -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();
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
use proc_macro::TokenStream;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn rmp_parallel_for(args: TokenStream, func: TokenStream) -> TokenStream {
|
||||
func
|
||||
}
|
||||
|
Loading…
Reference in New Issue