-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
Description
Describe the task
The following issue found an issue in compiling for zkVMs when building with hashsig: #857
PR #861 introduced a temporary workaround to building for zkvms with getrandom as building for a zkvm lead to the following error:
Building for a zkVM target leads to the following error:
error: target is not supported. You may need to define a custom backend see: https://docs.rs/getrandom/#custom-backends
--> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.2/src/backends.rs:176:9
|
176 | / compile_error!("target is not supported. You may need to define \
177 | | a custom backend see: \
178 | | https://docs.rs/getrandom/#custom-backends");
| |____________________________________________________________________^
The current workaround for us is to use the following rustflag that allows building getrandom with a custom backend.
[target.'cfg(target_os = "zkvm")']
rustflags = ["--cfg", "getrandom_backend=\"custom\""]
We want to have this fixed upstream and remove this workaround from our codebase. Issues related to this issue in upstream repositories (hash-sig and plonky3) will be linked below.
Plonky3: Plonky3/Plonky3#1089
Hash-sig: b-wagn/hash-sig#90
Additional context
No response