0.43.1 fix docs.rs
MODIFY
Cargo.toml
Cargo.toml
@@ -6,7 +6,7 @@ repository = "https://github.com/twistedfall/opencv-rust"
readme = "README.md"
keywords = ["opencv", "vision"]
license = "MIT"
-version = "0.43.0"
+version = "0.43.1"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>", "Pro <twisted.fall@gmail.com>"]
autoexamples = false # cuda example doesn't compile on just any system

MODIFY
README.md
README.md
@@ -298,8 +298,8 @@ to be able to free at least some of the closures.
### Unsafety
-Although crate tries to provide ergonomic Rust interface for OpenCV, don't expect
-Rust safety guarantees at this stage. It's especially true for borrow checking and
+Although the crate tries to provide an ergonomic Rust interface for OpenCV, don't expect
+Rust safety guarantees at this stage. It's especially true for the borrow-checking and the
shared mutable ownership. Notable example would be `Mat` which is a reference counted
object in its essence. You can own a seemingly separate `Mat` in Rust terms, but
it's going to be a mutable reference to the other `Mat` under the hood. Treat safety
@@ -309,32 +309,6 @@ of the crate's API as you would treat one of C++, use `clone()` when needed.
To be able to use some modules you need to have [`opencv_contrib`](https://github.com/opencv/opencv_contrib)
installed. You can find the full list of contrib modules [here](https://github.com/opencv/opencv_contrib/tree/master/modules) with the exception that `dnn` module is also considered contrib for OpenCV 3.2.
- * aruco
- * bgsegm
- * bioinspired
- * ccalib
- * cvv
- * dnn (only for OpenCV 3.2)
- * dpm
- * face
- * freetype
- * fuzzy
- * hdf
- * img_hash
- * line_descriptor
- * phase_unwrapping
- * plot
- * sfm
- * shape
- * structured_light
- * superres
- * surface_matching
- * text
- * videostab
- * viz
- * xfeatures2d
- * xobjdetect
- * xphoto
## Missing modules and functions

MODIFY
build.rs
build.rs
@@ -1095,8 +1095,17 @@ fn main() -> Result<()> {
for feature in features {
eprintln!("=== {}", feature);
}
+ let opencv_header_dir = if cfg!(feature = "opencv-32") {
+ MANIFEST_DIR.join("headers/3.2")
+ } else if cfg!(feature = "opencv-34") {
+ MANIFEST_DIR.join("headers/3.4")
+ } else if cfg!(feature = "opencv-4") {
+ MANIFEST_DIR.join("headers/4")
+ } else {
+ panic!("Please select one OpenCV major version using one of the opencv-* features or specify OpenCV header path manually via OPENCV_HEADER_DIR environment var");
+ };
let opencv = if cfg!(feature = "docs-only") {
- Library::probe_from_paths("", "", "")?
+ Library::probe_from_paths(opencv_header_dir.to_string_lossy().as_ref(), "", "")?
} else {
Library::probe()?
};
@@ -1110,14 +1119,8 @@ fn main() -> Result<()> {
opencv.include_paths.iter()
.find(|p| p.join("opencv2/core/version.hpp").is_file() || p.join("Headers/core/version.hpp").is_file())
.expect("Using buildtime-bindgen, but discovered OpenCV include paths is empty or contains non-existent paths").clone()
- } else if cfg!(feature = "opencv-32") {
- MANIFEST_DIR.join("headers/3.2")
- } else if cfg!(feature = "opencv-34") {
- MANIFEST_DIR.join("headers/3.4")
- } else if cfg!(feature = "opencv-4") {
- MANIFEST_DIR.join("headers/4")
} else {
- panic!("Please select one OpenCV major version using one of the opencv-* features or specify OpenCV header path manually via OPENCV_HEADER_DIR environment var");
+ opencv_header_dir
}
});

0.43.1 fix docs.rs