diff --git a/Cargo.lock b/Cargo.lock index 65cf9e9d5..eec73298e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,6 +25,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "approx" version = "0.3.2" @@ -97,9 +103,15 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "fixedbitset" @@ -126,22 +138,20 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" dependencies = [ "ahash", + "allocator-api2", "rayon", ] [[package]] name = "hermit-abi" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "indexmap" @@ -151,6 +161,16 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", "rayon", ] @@ -180,15 +200,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "libm" @@ -251,7 +271,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af5a8477ac96877b5bd1fd67e0c28736c12943aba24eda92b127e036b0c8f400" dependencies = [ - "indexmap", + "indexmap 1.9.3", "itertools 0.10.5", "ndarray", "noisy_float", @@ -321,9 +341,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", @@ -380,7 +400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4" dependencies = [ "fixedbitset", - "indexmap", + "indexmap 1.9.3", ] [[package]] @@ -396,14 +416,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fff39edfcaec0d64e8d0da38564fad195d2d51b680940295fcc307366e101e61" dependencies = [ "autocfg", - "indexmap", + "indexmap 1.9.3", ] [[package]] name = "proc-macro2" -version = "1.0.63" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -415,8 +435,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e681a6cfdc4adcc93b4d3cf993749a4552018ee0a9b65fc0ccfad74352c72a38" dependencies = [ "cfg-if", - "hashbrown 0.13.2", - "indexmap", + "hashbrown 0.14.0", + "indexmap 2.0.0", "indoc", "libc", "memoffset", @@ -483,9 +503,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" dependencies = [ "proc-macro2", ] @@ -589,8 +609,8 @@ version = "0.14.0" dependencies = [ "ahash", "fixedbitset", - "hashbrown 0.13.2", - "indexmap", + "hashbrown 0.14.0", + "indexmap 2.0.0", "ndarray", "ndarray-stats", "num-bigint", @@ -615,8 +635,8 @@ version = "0.14.0" dependencies = [ "ahash", "fixedbitset", - "hashbrown 0.13.2", - "indexmap", + "hashbrown 0.14.0", + "indexmap 2.0.0", "num-traits", "petgraph", "priority-queue", @@ -628,15 +648,15 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" @@ -671,9 +691,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "sprs" @@ -714,15 +734,15 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.8" +version = "0.12.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" +checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unindent" @@ -744,9 +764,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", diff --git a/Cargo.toml b/Cargo.toml index 5f8d976d7..0f9e770dc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,37 +1,60 @@ [package] name = "rustworkx" description = "A python graph library implemented in Rust" -version = "0.14.0" -authors = ["Matthew Treinish "] -license = "Apache-2.0" readme = "README.md" -repository = "https://github.com/Qiskit/rustworkx" keywords = ["python", "graph"] -edition = "2021" -rust-version = "1.64" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +repository.workspace = true +license.workspace = true [workspace] members = [ "rustworkx-core", ] -[lib] -name = "rustworkx" -crate-type = ["cdylib"] +[workspace.package] +version = "0.14.0" +edition = "2021" +rust-version = "1.64" +authors = ["Matthew Treinish "] +repository = "https://github.com/Qiskit/rustworkx" +license = "Apache-2.0" -[dependencies] +[workspace.dependencies] ahash = "0.8.3" -petgraph = "0.6.3" fixedbitset = "0.4.2" +hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] } +indexmap = { version = ">=1.9, <3", features = ["rayon"] } +num-traits = "0.2" numpy = "0.19.0" +petgraph = "0.6.3" rand = "0.8" rand_pcg = "0.3" rayon = "1.7" -num-traits = "0.2" +rayon-cond = "1.7" + +[lib] +name = "rustworkx" +crate-type = ["cdylib"] + +[dependencies] +ahash.workspace = true +fixedbitset.workspace = true +hashbrown.workspace = true +indexmap.workspace = true +ndarray-stats = "0.5.1" num-bigint = "0.4" num-complex = "0.4" -ndarray-stats = "0.5.1" +num-traits.workspace = true +numpy.workspace = true +petgraph.workspace = true quick-xml = "0.30" +rand.workspace = true +rand_pcg.workspace = true +rayon.workspace = true serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" rustworkx-core = { path = "rustworkx-core", version = "=0.14.0" } @@ -40,18 +63,10 @@ rustworkx-core = { path = "rustworkx-core", version = "=0.14.0" } version = "0.19.2" features = ["extension-module", "hashbrown", "num-bigint", "num-complex", "indexmap"] -[dependencies.hashbrown] -version = "0.13" -features = ["rayon"] - [dependencies.ndarray] version = "^0.15.6" features = ["rayon"] -[dependencies.indexmap] -version = "1.9" -features = ["rayon"] - [dependencies.sprs] version = "^0.11" features = ["multi_thread"] diff --git a/rustworkx-core/Cargo.toml b/rustworkx-core/Cargo.toml index b69869912..7b64841e8 100644 --- a/rustworkx-core/Cargo.toml +++ b/rustworkx-core/Cargo.toml @@ -1,31 +1,25 @@ [package] name = "rustworkx-core" -version = "0.14.0" -edition = "2021" -authors = ["Matthew Treinish "] description = "Rust APIs used for rustworkx algorithms" -license = "Apache-2.0" readme = "README.md" -repository = "https://github.com/Qiskit/rustworkx" -homepage = "https://github.com/Qiskit/rustworkx/tree/main/rustworkx-core" keywords = ["graph"] -rust-version = "1.64" +homepage = "https://github.com/Qiskit/rustworkx/tree/main/rustworkx-core" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +repository.workspace = true +license.workspace = true [dependencies] -ahash = "0.8.3" -fixedbitset = "0.4.2" -petgraph = "0.6.3" -rand = "0.8.5" -rand_pcg = "0.3.1" -rayon = "1.7" -num-traits = "0.2" +ahash.workspace = true +fixedbitset.workspace = true +hashbrown.workspace = true +indexmap.workspace = true +num-traits.workspace = true +petgraph.workspace = true priority-queue = "1.3" +rand.workspace = true +rand_pcg.workspace = true +rayon.workspace = true rayon-cond = "0.3" - -[dependencies.hashbrown] -version = "0.13" -features = ["rayon"] - -[dependencies.indexmap] -version = "1.9" -features = ["rayon"]