-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove thiserror from risc0-zkp #704
Conversation
Benchmark for Linux-cuda cc9b84fClick to hide benchmark
Benchmark for Linux-default
Benchmark for macOS-default cc9b84fClick to hide benchmark
Benchmark for macOS-metal
|
Benchmark for Linux-cuda adf6105Click to hide benchmark
Benchmark for Linux-default adf6105Click to hide benchmark
Benchmark for macOS-default adf6105Click to hide benchmark
Benchmark for macOS-metal
|
Benchmark for Linux-cuda
Benchmark for Linux-default
Benchmark for macOS-default
Benchmark for macOS-metal 14c9460Click to hide benchmark
|
Have you considered instead of out right removing thiserror to create a std and no_std option? For example in code that I want to support no_std environments I would add: [features]
default = ["std"]
std = ["thiserror"]
[dependencies]
thiserror = { version = "1.0.40", optional = true} And then I would use the std features like so: #![cfg_attr(not(feature = "std"), no_std)]
#[cfg(not(feature = "std"))]
extern crate alloc;
#[cfg(feature = "std")]
use thiserror::Error;
#[derive(Debug, PartialEq)]
#[cfg_attr(feature = "std", derive(Error))]
pub enum CustomError {
/// The Prover was unable to construct a proof with your given inputs
#[cfg_attr(
feature = "std",
error("The prover was unable to construct a proof with your given inputs")
)]
UnableToProve,
} |
@Brando753 I'd like to have support for error messages in |
Understood; looking over the changes, it's not that bad. If you don't have too many error structs, then it's probably not worth worrying about. I don't see the no_std crate attribute. Are you planning to add that? |
Benchmark for Linux-cuda b761214Click to hide benchmark
Benchmark for Linux-default
Benchmark for macOS-default b761214Click to hide benchmark
Benchmark for macOS-metal b761214Click to hide benchmark
|
Benchmark for Linux-cuda b88f6f2Click to hide benchmark
Benchmark for Linux-default
Benchmark for macOS-default b88f6f2Click to hide benchmark
Benchmark for macOS-metal b88f6f2Click to hide benchmark
|
See: https://github.com/risc0/risc0/blob/main/risc0/zkp/src/lib.rs#L16 |
Fix for #694