mirror of
https://github.com/xythrez/RustMP.git
synced 2025-09-03 05:12:36 +00:00
Initial commit: project setup
This commit is contained in:
commit
0cebbf9d5d
5 changed files with 38 additions and 0 deletions
12
src/bin/test_simple.rs
Normal file
12
src/bin/test_simple.rs
Normal file
|
@ -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();
|
||||
}
|
7
src/lib.rs
Normal file
7
src/lib.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
use proc_macro::TokenStream;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn rmp_parallel_for(args: TokenStream, func: TokenStream) -> TokenStream {
|
||||
func
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue