call dispatch macro:[WIP]在Rust过程宏中生成函数调用分派器 源码
呼叫调度宏 在Rust过程宏中生成函数调用调度程序。 :construction: 工作在进行中 :construction: 用法 use call_dispatch_macro :: call_dispatch; // Define a struct. struct Syscall ; // Put `call_dispatch` attribute on the impl block. #[call_dispatch] impl Syscall { // Mark the dispatcher function. #[dispatcher(match_arm_prefix = "sys" )] fn dispatch ( & mut self , num: u32 , args: [ usize ; 6 ]) - > Option { // The body will be
文件列表
call-dispatch-macro-main.zip
(预估有个8文件)
call-dispatch-macro-main
.github
workflows
main.yml
838B
tests
01-test.rs
923B
02-async.rs
770B
progress.rs
128B
src
lib.rs
4KB
暂无评论