diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-23 08:08:33 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-23 14:01:45 +0800 |
| commit | 68a652ed2f51d366bb8033497e6dfe545895410e (patch) | |
| tree | d463833846248410733e196a0939c59cd67ca8a2 /doc/usage/invoke.rs | |
feat: scaffold crate structure and implement core macros
Add the project skeleton, LICENSE files, README, Makefile, doc
examples, and the initial implementation of `#[func]`, `invoke!`,
and `select!` procedural macros.
Diffstat (limited to 'doc/usage/invoke.rs')
| -rw-r--r-- | doc/usage/invoke.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/usage/invoke.rs b/doc/usage/invoke.rs new file mode 100644 index 0000000..0ae90d2 --- /dev/null +++ b/doc/usage/invoke.rs @@ -0,0 +1,10 @@ +#[func] +fn compute(x: i32) -> i32 { + x * 2 +} + +#[func] +fn example() -> i32 { + // invoke! macro should be used with #[func] + invoke!(compute(5)) +} |
