1
0

feat: add rust support for code gen

This commit is contained in:
2026-02-11 10:27:44 +08:00
parent fdf2a4fc22
commit 3310cac100
3 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{%- for fct in payload.fcts %}
/// {{ fct.fct_name }}
///
/// # Parameters
///
{%- for param in fct.fct_params %}
/// - `{{ param.var_name }}`: Direction: {% if param.is_input -%} input {%- else -%} output {%- endif %}. C++ type: `{{ param.var_type.to_c_type() }}`. {{ param.var_desc }}
{%- endfor %}
///
/// # Return
///
/// True if no error, otherwise False.
pub unsafe fn {{ fct.fct_name }}() -> bool;
{%- endfor %}