sdd / kiddo

Kiddo
Apache License 2.0
79 stars 13 forks source link

Errors when 'rkyv' feature is activated. #159

Open rendarz opened 2 months ago

rendarz commented 2 months ago

If I try to compile my crate which imports kiddo with the rkyv feature activated, I get a lot of errors. This is how I import kiddo:

kiddo = { version = "4.2.0", features = ["serialize", "rkyv"] }

And those are the errors:

error[E0432]: unresolved imports crate::float::kdtree::ArchivedKdTree, crate::float::kdtree::ArchivedLeafNode --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/best_n_within.rs:58:28 58 use crate::float::kdtree::{ArchivedKdTree, ArchivedLeafNode}; ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ no ArchivedLeafNode in float::kdtree
no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::float::kdtree::ArchivedKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/nearest_n.rs:50:5 | 50 | use crate::float::kdtree::ArchivedKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::float::kdtree::ArchivedKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/nearest_n_within.rs:55:5 | 55 | use crate::float::kdtree::ArchivedKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedKdTree in float::kdtree

error[E0432]: unresolved imports crate::float::kdtree::ArchivedKdTree, crate::float::kdtree::ArchivedLeafNode --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/nearest_one.rs:55:28 55 use crate::float::kdtree::{ArchivedKdTree, ArchivedLeafNode}; ^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ no ArchivedLeafNode in float::kdtree
no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::float::kdtree::ArchivedKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/within.rs:49:5 | 49 | use crate::float::kdtree::ArchivedKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::float::kdtree::ArchivedKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/within_unsorted.rs:50:5 | 50 | use crate::float::kdtree::ArchivedKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::float::kdtree::ArchivedKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/query/within_unsorted_iter.rs:52:5 | 52 | use crate::float::kdtree::ArchivedKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedKdTree in float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/approx_nearest_one.rs:51:5 | 51 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/best_n_within.rs:56:5 | 56 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/nearest_n.rs:48:5 | 48 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/nearest_n_within.rs:58:5 | 58 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/nearest_one.rs:56:5 | 56 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/within.rs:48:5 | 48 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0432]: unresolved import crate::immutable::float::kdtree::ArchivedImmutableKdTree --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/query/within_unsorted.rs:48:5 | 48 | use crate::immutable::float::kdtree::ArchivedImmutableKdTree; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no ArchivedImmutableKdTree in immutable::float::kdtree

error[E0412]: cannot find type ArchivedKdTree in this scope --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float/kdtree.rs:293:7 | 293 | > ArchivedKdTree<A, T, K, B, IDX> | ^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type ArchivedImmutableKdTree in this scope --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/immutable/float/kdtree.rs:606:7 | 606 | > ArchivedImmutableKdTree<A, T, K, B> | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type ArchivedLeafNode in this scope --> /home/rendar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kiddo-4.2.0/src/float_leaf_simd/leaf_node.rs:105:44 | 105 | impl<A, T, const K: usize, const B: usize> ArchivedLeafNode<A, T, K, B> | ^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0432. For more information about an error, try rustc --explain E0412. error: could not compile kiddo (lib) due to 17 previous errors

t2m4k1 commented 1 week ago

you might wanna use the serialize_rkyv feature as well - in my case that resolved the problem.

kiddo = { version = "4.2.0", features = ["rkyv", "serialize_rkyv"] }