doc: update ffi design

This commit is contained in:
2026-08-14 16:38:09 +08:00
parent d7e92d588f
commit 40fee18194
9 changed files with 144 additions and 28 deletions
@@ -133,7 +133,7 @@ Input parameters are passed directly by value (for example, integers, floats or
pointers). In the example, `in_a` and `in_b` are both of type `u32`. You can use
the `in_param_ty!` macro provided by the crate to conveniently mark this.
By convention, input parameters are prefixed with `in_`, but this is not enforced.
By convention, input parameters are prefixed with `in`, but this is not enforced.
#### Output Parameters
@@ -149,7 +149,7 @@ conveniently dereference an output parameter for assignment, or directly use the
need to do that, because in later chapters you will be guided on how to correctly
use `cffi_wrapper!` to maximize the efficiency of writing FFI functions.
By convention, output parameters are prefixed with `out_`, but this is not enforced.
By convention, output parameters are prefixed with `out`, but this is not enforced.
### The Return Value