diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-01-21 16:14:04 +0200 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-01-21 16:14:04 +0200 |
| commit | cf9d2b10b8fe0670e9b3b47b2326c4d587401985 (patch) | |
| tree | cec7243ab9a02bcc96da443631c5e73bd3fb600f /guests | |
| parent | 7855804447d9827777a9ca715611f5134959cbbe (diff) | |
| download | zkVMs-benchmarks-cf9d2b10b8fe0670e9b3b47b2326c4d587401985.tar zkVMs-benchmarks-cf9d2b10b8fe0670e9b3b47b2326c4d587401985.tar.gz zkVMs-benchmarks-cf9d2b10b8fe0670e9b3b47b2326c4d587401985.zip | |
feat(guests/graph_coloring): Support no_std conditionally
For use in Nexus
Diffstat (limited to 'guests')
| -rw-r--r-- | guests/graph_coloring/Cargo.toml | 3 | ||||
| -rw-r--r-- | guests/graph_coloring/src/lib.rs | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/guests/graph_coloring/Cargo.toml b/guests/graph_coloring/Cargo.toml index 180ec35..a0cbd83 100644 --- a/guests/graph_coloring/Cargo.toml +++ b/guests/graph_coloring/Cargo.toml @@ -5,3 +5,6 @@ edition = "2021" [dependencies] guests_macro = { version = "0.1.0", path = "../../guests_macro" } + +[features] +no_std = [] diff --git a/guests/graph_coloring/src/lib.rs b/guests/graph_coloring/src/lib.rs index 691a127..6dc1cf3 100644 --- a/guests/graph_coloring/src/lib.rs +++ b/guests/graph_coloring/src/lib.rs @@ -1,3 +1,10 @@ +#![cfg_attr(feature = "no_std", no_std)] + +#[cfg(feature = "no_std")] +extern crate alloc; +#[cfg(feature = "no_std")] +use alloc::vec::Vec; + #[guests_macro::proving_entrypoint] pub fn main( graph: Vec<Vec<bool>>, |
