Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working with no-std #54

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

IshitaTakeshi
Copy link

I found that kdtree-rs can be used for development of robot localization algorithms on edge devices, so I made this crate compatible with no-std.

The main modification was to replace std functions with the ones in the core crate. The thiserror crate seems only available on std, so it will be disabled on no-std.

I did this modification just for my use case. If this PR is not necessary for you, feel free to close without merge.

@mrhooray
Copy link
Owner

Thanks for the PR. I'm not familiar with no std setup - current state fails when testing with std feature

cargo test --features std
warning: no edition set: defaulting to the 2015 edition while the latest is 2021
   Compiling kdtree v0.7.0 (/Users/rui/Projects/kdtree-rs)
error[E0433]: failed to resolve: you might be missing crate `core`
 --> src/heap_element.rs:2:5
  |
2 | use core::cmp::Ordering;
  |     ^^^^
  |     |
  |     you might be missing crate `core`
  |     help: try using `std` instead of `core`: `std`

error[E0433]: failed to resolve: you might be missing crate `core`
  --> src/util.rs:25:9
   |
25 |     use core::f64::{INFINITY, NEG_INFINITY};
   |         ^^^^
   |         |
   |         you might be missing crate `core`
   |         help: try using `std` instead of `core`: `std`
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants