dfa917c775
This commit adds optional support for conversion from hashbrown's [1] HashMap [2] and HashSet [3] types. The HashMap and HashSet implementation in std::collections is a copy from HashBrown, but Hashbrown still provides some features over the std::collections version. Primarily this is rayon support and also using a default hasher which is faster (although not DOS resistent). The hashbrown versions provide a drop in replacement over std::collections to get these features. To take advantage of native type conversion in PyO3 this commit adds hashbrown as an optional dependency and when the feature is enabled the traits for going between python and hashbrown::HashMap and hashbrown::HashSet are available. This is handy for users of hashbrown which have to inline these conversions manually in functions that take dicts as args. [1] https://github.com/rust-lang/hashbrown [2] https://docs.rs/hashbrown/0.8.2/hashbrown/struct.HashMap.html [3] https://docs.rs/hashbrown/0.8.2/hashbrown/struct.HashSet.html
60 lines
1.8 KiB
TOML
60 lines
1.8 KiB
TOML
[package]
|
|
name = "pyo3"
|
|
version = "0.11.1"
|
|
description = "Bindings to Python interpreter"
|
|
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
|
|
readme = "README.md"
|
|
keywords = ["pyo3", "python", "cpython", "ffi"]
|
|
homepage = "https://github.com/pyo3/pyo3"
|
|
repository = "https://github.com/pyo3/pyo3"
|
|
documentation = "https://docs.rs/crate/pyo3/"
|
|
categories = ["api-bindings", "development-tools::ffi"]
|
|
license = "Apache-2.0"
|
|
exclude = ["/.gitignore", ".cargo/config"]
|
|
build = "build.rs"
|
|
edition = "2018"
|
|
|
|
[dependencies]
|
|
ctor = { version = "0.1", optional = true }
|
|
indoc = { version = "0.3.4", optional = true }
|
|
inventory = { version = "0.1.4", optional = true }
|
|
libc = "0.2.62"
|
|
parking_lot = "0.11.0"
|
|
num-bigint = { version = "0.3", optional = true }
|
|
num-complex = { version = "0.3", optional = true }
|
|
paste = { version = "0.1.6", optional = true }
|
|
pyo3cls = { path = "pyo3cls", version = "=0.11.1", optional = true }
|
|
unindent = { version = "0.1.4", optional = true }
|
|
hashbrown = { version = "0.8", optional = true }
|
|
|
|
[dev-dependencies]
|
|
assert_approx_eq = "1.1.0"
|
|
trybuild = "1.0.23"
|
|
rustversion = "1.0"
|
|
|
|
[features]
|
|
default = ["macros"]
|
|
macros = ["ctor", "indoc", "inventory", "paste", "pyo3cls", "unindent"]
|
|
# Optimizes PyObject to Vec conversion and so on.
|
|
nightly = []
|
|
|
|
# this is no longer needed internally, but setuptools-rust assumes this feature
|
|
python3 = []
|
|
|
|
# Use this feature when building an extension module.
|
|
# It tells the linker to keep the python symbols unresolved,
|
|
# so that the module can also be used with statically linked python interpreters.
|
|
extension-module = []
|
|
|
|
# The stable cpython abi as defined in PEP 384. Currently broken with
|
|
# many compilation errors. Pull Requests working towards fixing that
|
|
# are welcome.
|
|
# abi3 = []
|
|
|
|
[workspace]
|
|
members = [
|
|
"pyo3cls",
|
|
"pyo3-derive-backend",
|
|
"examples/*"
|
|
]
|