[package] name = "lambdaworks-math" description = "Modular math library for cryptography" version.workspace = true edition.workspace = true license.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] serde = { version = "1.0", default-features = false, features = [ "derive", ], optional = true } serde_json = { version = "1.0", default-features = false, features = [ "alloc", ], optional = true } proptest = { version = "1.1.0", optional = true } winter-math = { package = "winter-math", version = "0.6.4", default-features = false, optional = true } miden-core = { package = "miden-core", version = "0.7", default-features = false, optional = true } # rayon rayon = { version = "1.7", optional = true } # metal metal = { version = "0.24.0", optional = true } objc = { version = "0.2.7", optional = true } # cuda cudarc = { version = "0.9.7", optional = true } lambdaworks-gpu = { workspace = true, optional = true } [dev-dependencies] rand = { version = "0.8.5", features = ["std"] } rand_chacha = "0.3.1" criterion = "0.5.1" const-random = "0.1.15" iai-callgrind.workspace = true proptest = "1.1.0" pprof = { version = "0.13.0", features = ["criterion", "flamegraph"] } [features] default = ["parallel", "std"] std = ["alloc", "serde?/std", "serde_json?/std"] alloc = [] parallel = ["dep:rayon"] lambdaworks-serde-binary = ["dep:serde", "alloc"] lambdaworks-serde-string = ["dep:serde", "dep:serde_json", "alloc"] proptest = ["dep:proptest"] winter_compatibility = ["winter-math", "miden-core"] instruments = [] # gpu metal = [ "dep:metal", "dep:objc", "dep:lambdaworks-gpu", "lambdaworks-gpu?/metal", ] cuda = ["dep:cudarc", "dep:lambdaworks-gpu"] [[bench]] name = "criterion_elliptic_curve" harness = false [[bench]] name = "iai_elliptic_curve" harness = false [[bench]] name = "criterion_polynomial" harness = false [[bench]] name = "iai_polynomial" harness = false [[bench]] name = "criterion_field" harness = false [[bench]] name = "iai_field" harness = false [[bench]] name = "criterion_msm" harness = false required-features = ["parallel"] [[bench]] name = "criterion_fft" harness = false [[bench]] name = "iai_fft" harness = false [[bench]] name = "criterion_metal" harness = false required-features = ["metal"]