diff --git a/book/src/custom-extensions/bigint.md b/book/src/custom-extensions/bigint.md index 8b0cfd53a5..1d79481277 100644 --- a/book/src/custom-extensions/bigint.md +++ b/book/src/custom-extensions/bigint.md @@ -76,6 +76,12 @@ pub fn main() { } ``` +To be able to import the `U256` struct, add the following to your `Cargo.toml` file: + +```toml +openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git" } +``` + ## `I256` The `I256` struct is a 256-bit signed integer type. The `I256` struct is very similar to the `U256` struct. @@ -150,6 +156,12 @@ pub fn main() { } ``` +To be able to import the `I256` struct, add the following to your `Cargo.toml` file: + +```toml +openvm-bigint-guest = { git = "https://github.com/openvm-org/openvm.git" } +``` + ## External Functions The Bigint Guest extension provides another way to use the native implementation. It provides external functions that are meant to be linked to other external libraries. The external libraries can use these functions as a hook for the 256 bit integer native implementations. Enabled only when the `target_os = "zkvm"`. All of the functions are defined as `unsafe extern "C" fn`. Also, note that you must enable the feature `export-intrinsics` to make them globally linkable. @@ -194,4 +206,4 @@ For the guest program to build successfully add the following to your `.toml` fi ```toml [app_vm_config.bigint] -``` \ No newline at end of file +``` diff --git a/book/src/custom-extensions/keccak.md b/book/src/custom-extensions/keccak.md index 527ea6c25b..6440650f1c 100644 --- a/book/src/custom-extensions/keccak.md +++ b/book/src/custom-extensions/keccak.md @@ -32,6 +32,12 @@ pub fn main() { } ``` +To be able to import the `keccak256` function, add the following to your `Cargo.toml` file: + +```toml +openvm-keccak256-guest = { git = "https://github.com/openvm-org/openvm.git" } +``` + ## Native Keccak256 Keccak guest extension also provides another way to use the native Keccak-256 implementation. It provides a function that is meant to be linked to other external libraries. The external libraries can use this function as a hook for the Keccak-256 native implementation. Enabled only when the target is `zkvm`. @@ -65,4 +71,4 @@ For the guest program to build successfully add the following to your `.toml` fi ```toml [app_vm_config.keccak256] -``` \ No newline at end of file +```