mirror of
https://github.com/xythrez/RustMP.git
synced 2025-04-20 02:03:30 +00:00
Initial commit: project setup
This commit is contained in:
commit
0cebbf9d5d
5 changed files with 38 additions and 0 deletions
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/target
|
||||||
|
Cargo.lock
|
12
Cargo.toml
Normal file
12
Cargo.toml
Normal file
|
@ -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]
|
5
README.md
Normal file
5
README.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
RustMP
|
||||||
|
======
|
||||||
|
|
||||||
|
Placeholder for RustMP README
|
||||||
|
|
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
Reference in a new issue