diff --git a/lib/api/src/externals/function.rs b/lib/api/src/externals/function.rs index ca5ff59d4ad..faf77379c0c 100644 --- a/lib/api/src/externals/function.rs +++ b/lib/api/src/externals/function.rs @@ -69,6 +69,9 @@ pub struct Function { impl Function { /// Creates a new host `Function` (dynamic) with the provided signature. /// + /// If you know the signature of the host function at compile time, + /// consider using [`Function::new_native`] for less runtime overhead. + /// /// # Examples /// /// ``` @@ -134,6 +137,10 @@ impl Function { /// Creates a new host `Function` (dynamic) with the provided signature and environment. /// + /// If you know the signature of the host function at compile time, + /// consider using [`Function::new_native_with_env`] for less runtime + /// overhead. + /// /// # Examples /// /// ```