diff --git a/doc/docs.md b/doc/docs.md index e4a60834ee..44cfdcb461 100644 --- a/doc/docs.md +++ b/doc/docs.md @@ -131,6 +131,7 @@ For more details and troubleshooting, please visit the [vab GitHub repository](h * [Structs with reference fields](#structs-with-reference-fields) * [sizeof and __offsetof](#sizeof-and-__offsetof) * [Calling C from V](#calling-c-from-v) + * [Calling V from C](#calling-v-from-c) * [Atomics](#atomics) * [Global Variables](#global-variables) * [Debugging](#debugging) @@ -4270,11 +4271,11 @@ fn main() { ## Calling V from C -Since V can compile to C, calling V code from C is very easy. +Since V can compile to C, calling V code from C is very easy. By default all V functions have the following naming scheme in C: `[module name]__[fn_name]`. -For example, `fn foo() {}` in module `bar` will result in `foo__bar()`. +For example, `fn foo() {}` in module `bar` will result in `bar__foo()`. To use a custom export name, use the `[export]` attribute: