diff --git a/src/Simulation/qdk_sim_rs/Cargo.toml b/src/Simulation/qdk_sim_rs/Cargo.toml index 54a7e92640d..c07c901fbd9 100644 --- a/src/Simulation/qdk_sim_rs/Cargo.toml +++ b/src/Simulation/qdk_sim_rs/Cargo.toml @@ -24,87 +24,84 @@ exclude = [ "*.egg-info", "qdk_sim_experimental", "setup.py", "*.whl", "pyproject.toml" ] +# Enable LaTeX on docs.rs. +# See https://stackoverflow.com/a/54573800/267841 and +# https://github.com/rust-num/num/pull/226/files for why this works. +[package.metadata.docs.rs] +rustdoc-args = [ "--html-in-header", "docs-includes/header.html", "--html-after-content", "docs-includes/after.html" ] +features = ["document-features"] + [lib] +crate-type = ["rlib", "staticlib", "cdylib"] name = "qdk_sim" path = "src/lib.rs" -crate-type = ["rlib", "staticlib", "cdylib"] # Optional build-time features: we use this to create Python and WASM bindings. [features] default = [] -## Ensures that the crate is compatible with usage from WebAssembly. -wasm = ["web-sys"] - # When Python bindings are enabled, we also need the pyo3 dependency. ## Enables Python bindings for this crate. python = ["pyo3", "numpy"] -# Enable LaTeX on docs.rs. -# See https://stackoverflow.com/a/54573800/267841 and -# https://github.com/rust-num/num/pull/226/files for why this works. -[package.metadata.docs.rs] -rustdoc-args = [ "--html-in-header", "docs-includes/header.html", "--html-after-content", "docs-includes/after.html" ] -features = ["document-features"] +## Ensures that the crate is compatible with usage from WebAssembly. +wasm = ["web-sys"] [profile.release] -opt-level = 3 codegen-units = 1 # Reduce number of codegen units to increase optimizations. +opt-level = 3 panic = 'unwind' [dependencies] -ndarray = { version = "0.15.2", features = ["serde"] } -num-complex = { version = "0.4", features = ["serde"] } -num-traits = "0.2" -derive_more = "0.99.10" -itertools = "0.9.0" -rand = { version = "0.7.3", features = ["alloc"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -lazy_static = "1.4.0" +anyhow = "1.0.56" +# We use built to expose compile-time metadata about how this crate +# was built to C and Rust callers. +built = "0.5.0" +cauchy = "0.4.0" cfg-if = "1.0.0" -num_enum = "0.5.1" +derive_more = "0.99.10" +# We use document-features to automatically generate feature documentation from +# Cargo.toml, following the example at +document-features = { version = "0.2", optional = true } # See https://github.com/rust-random/rand/issues/990 # and https://docs.rs/getrandom/0.1.15/getrandom/index.html#support-for-webassembly-and-asmjs # for why this is needed. # NB: We depend on 0.1.15, since that's what gets brought in transitively # by rand and rand_core. getrandom = { version = "0.1.15", features = ["wasm-bindgen"] } - -# We only need web-sys when compiling with the wasm feature. -web-sys = { version = "0.3.4", features = ['console'], optional = true } - +itertools = "0.9.0" +lazy_static = "1.4.0" +miette = "4.3.0" +ndarray = { version = "0.15.2", features = ["serde"] } +num-complex = { version = "0.4", features = ["serde"] } +num-traits = "0.2" +num_enum = "0.5.1" +numpy = { version = "0.13.1", optional = true } # We only need PyO3 when generating Python bindings. pyo3 = { version = "0.13.2", features = ["extension-module"], optional = true } -numpy = {version = "0.13.1", optional = true} - -# We use built to expose compile-time metadata about how this crate -# was built to C and Rust callers. -built = "0.5.0" -cauchy = "0.4.0" +rand = { version = "0.7.3", features = ["alloc"] } +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" thiserror = "1.0.30" -miette = "4.3.0" -anyhow = "1.0.56" -# We use document-features to automatically generate feature documentation from -# Cargo.toml, following the example at -document-features = { version = "0.2", optional = true } +# We only need web-sys when compiling with the wasm feature. +web-sys = { version = "0.3.4", features = ['console'], optional = true } [build-dependencies] built = "0.5.0" [dev-dependencies] +approx = { version = "0.5.1", features = ["num-complex"] } assert-json-diff = "2.0.1" criterion = { version = "0.3", features = ['html_reports', 'csv_output'] } -approx = { version = "0.5.1", features = ["num-complex"] } ndarray = { version = "0.15.4", features = ["approx"] } [[bench]] -name = "c_api_benchmark" harness = false +name = "c_api_benchmark" [[bench]] -name = "microbenchmark" harness = false +name = "microbenchmark"