@@ -24,87 +24,84 @@ exclude = [
2424 " *.egg-info" , " qdk_sim_experimental" , " setup.py" , " *.whl" , " pyproject.toml"
2525]
2626
27+ # Enable LaTeX on docs.rs.
28+ # See https://stackoverflow.com/a/54573800/267841 and
29+ # https://github.com/rust-num/num/pull/226/files for why this works.
30+ [package .metadata .docs .rs ]
31+ rustdoc-args = [ " --html-in-header" , " docs-includes/header.html" , " --html-after-content" , " docs-includes/after.html" ]
32+ features = [" document-features" ]
33+
2734[lib ]
35+ crate-type = [" rlib" , " staticlib" , " cdylib" ]
2836name = " qdk_sim"
2937path = " src/lib.rs"
30- crate-type = [" rlib" , " staticlib" , " cdylib" ]
3138
3239# Optional build-time features: we use this to create Python and WASM bindings.
3340[features ]
3441default = []
3542
36- # # Ensures that the crate is compatible with usage from WebAssembly.
37- wasm = [" web-sys" ]
38-
3943# When Python bindings are enabled, we also need the pyo3 dependency.
4044# # Enables Python bindings for this crate.
4145python = [" pyo3" , " numpy" ]
4246
43- # Enable LaTeX on docs.rs.
44- # See https://stackoverflow.com/a/54573800/267841 and
45- # https://github.com/rust-num/num/pull/226/files for why this works.
46- [package .metadata .docs .rs ]
47- rustdoc-args = [ " --html-in-header" , " docs-includes/header.html" , " --html-after-content" , " docs-includes/after.html" ]
48- features = [" document-features" ]
47+ # # Ensures that the crate is compatible with usage from WebAssembly.
48+ wasm = [" web-sys" ]
4949
5050
5151[profile .release ]
52- opt-level = 3
5352codegen-units = 1 # Reduce number of codegen units to increase optimizations.
53+ opt-level = 3
5454panic = ' unwind'
5555
5656[dependencies ]
57- ndarray = { version = " 0.15.2" , features = [" serde" ] }
58- num-complex = { version = " 0.4" , features = [" serde" ] }
59- num-traits = " 0.2"
60- derive_more = " 0.99.10"
61- itertools = " 0.9.0"
62- rand = { version = " 0.7.3" , features = [" alloc" ] }
63- serde = { version = " 1.0" , features = [" derive" ] }
64- serde_json = " 1.0"
65- lazy_static = " 1.4.0"
57+ anyhow = " 1.0.56"
58+ # We use built to expose compile-time metadata about how this crate
59+ # was built to C and Rust callers.
60+ built = " 0.5.0"
61+ cauchy = " 0.4.0"
6662cfg-if = " 1.0.0"
67- num_enum = " 0.5.1"
63+ derive_more = " 0.99.10"
64+ # We use document-features to automatically generate feature documentation from
65+ # Cargo.toml, following the example at
66+ document-features = { version = " 0.2" , optional = true }
6867# See https://github.com/rust-random/rand/issues/990
6968# and https://docs.rs/getrandom/0.1.15/getrandom/index.html#support-for-webassembly-and-asmjs
7069# for why this is needed.
7170# NB: We depend on 0.1.15, since that's what gets brought in transitively
7271# by rand and rand_core.
7372getrandom = { version = " 0.1.15" , features = [" wasm-bindgen" ] }
74-
75- # We only need web-sys when compiling with the wasm feature.
76- web-sys = { version = " 0.3.4" , features = [' console' ], optional = true }
77-
73+ itertools = " 0.9.0"
74+ lazy_static = " 1.4.0"
75+ miette = " 4.3.0"
76+ ndarray = { version = " 0.15.2" , features = [" serde" ] }
77+ num-complex = { version = " 0.4" , features = [" serde" ] }
78+ num-traits = " 0.2"
79+ num_enum = " 0.5.1"
80+ numpy = { version = " 0.13.1" , optional = true }
7881# We only need PyO3 when generating Python bindings.
7982pyo3 = { version = " 0.13.2" , features = [" extension-module" ], optional = true }
80- numpy = {version = " 0.13.1" , optional = true }
81-
82- # We use built to expose compile-time metadata about how this crate
83- # was built to C and Rust callers.
84- built = " 0.5.0"
85- cauchy = " 0.4.0"
83+ rand = { version = " 0.7.3" , features = [" alloc" ] }
84+ serde = { version = " 1.0" , features = [" derive" ] }
85+ serde_json = " 1.0"
8686thiserror = " 1.0.30"
87- miette = " 4.3.0"
88- anyhow = " 1.0.56"
8987
90- # We use document-features to automatically generate feature documentation from
91- # Cargo.toml, following the example at
92- document-features = { version = " 0.2" , optional = true }
88+ # We only need web-sys when compiling with the wasm feature.
89+ web-sys = { version = " 0.3.4" , features = [' console' ], optional = true }
9390
9491[build-dependencies ]
9592built = " 0.5.0"
9693
9794
9895[dev-dependencies ]
96+ approx = { version = " 0.5.1" , features = [" num-complex" ] }
9997assert-json-diff = " 2.0.1"
10098criterion = { version = " 0.3" , features = [' html_reports' , ' csv_output' ] }
101- approx = { version = " 0.5.1" , features = [" num-complex" ] }
10299ndarray = { version = " 0.15.4" , features = [" approx" ] }
103100
104101[[bench ]]
105- name = " c_api_benchmark"
106102harness = false
103+ name = " c_api_benchmark"
107104
108105[[bench ]]
109- name = " microbenchmark"
110106harness = false
107+ name = " microbenchmark"
0 commit comments