Comments (13)
Looks like this is because I had default-features = false, which built successfully against the commit, but not against the published 0.5.1. Also not using default-features now pulls in so many build-dependencies that it enables std most of the time regardless. So yeah, I'll stay on the old commit until I can figure out how to get this to properly compile against no_std again.
from hashbrown.
I yanked 0.5.1. It seems that ahash
depends on crates which are not no_std
.
cc @tkaitchuck
from hashbrown.
I think that marking the const_random
crate with #![no_std]
should be sufficient here. Everything else is compiled as a proc macro.
from hashbrown.
It's proc_macro_hack. I've filed an issue here: dtolnay/proc-macro-hack#38
The fix looks simple.
from hashbrown.
Huh? It's fine for the implementation of a proc macro to use std even if the macro is called from crates that are no_std. For example serde_derive supports deriving Serialize and Deserialize in no_std crates but uses plenty of std internally.
Are you trying to write a proc macro where the macro implementation itself is no_std?
from hashbrown.
@dtolnay The issue is that the const_random
crate, which uses proc_macro_hack
is pulling in libstd. And it seems that this crate is compiled for the target architecture, not the host architecture.
from hashbrown.
The const-random crate is not a proc macro crate, it's fine for that to be no_std and proc-macro-hack supports that just fine. The const-random-macro crate is a proc macro so there should be no reason to make it no_std. A proc macro isn't going to get compiled for the target architecture.
from hashbrown.
It looks like it's just the missing #![no_std] in const-random. proc-macro-hack should not affect anything. (Although the crates pulled in via the proc macro might, due to the cargo bug where features are activated for the target architecture by accident)
from hashbrown.
Ok, we can test that. I've added #![no_std] in const_random 0.1.4 and pushed a version of aHash that specifies this version.
from hashbrown.
@tkaitchuck Did you see my pull request? tkaitchuck/constrandom#2
from hashbrown.
@Amanieu Merged and pushed to github and cargo
from hashbrown.
Unfortunately this still doesn't fix the issue I mentioned in #110:
error: failed to parse manifest at `/home/amanieu/.cargo/registry/src/github.com-1ecc6299db9ec823/const-random-0.1.5/Cargo.toml`
Caused by:
the cargo feature `public-dependency` requires a nightly version of Cargo, but this is the `stable` channel
See https://doc.rust-lang.org/book/appendix-07-nightly-rust.html for more information about Rust release channels.
from hashbrown.
@Amanieu Fixed in 0.1.6 which is depended on by aHash 0.2.9
from hashbrown.
Related Issues (20)
- Why the identity function can be used as unlikely function? HOT 3
- `hashbrown` fails to compile as a transitive dependency HOT 2
- allocator-api2 default-feature? HOT 2
- Compiling hashbrown 0.14.2 for aarch64-unknown-linux-gnu with "target-cpu=cortex-a53" generates illegal instructions HOT 2
- Switching to GxHash? HOT 9
- Feature: increase capacity according to the actual size returned by the allocator HOT 2
- Hashbrown crash due to bad malloc HOT 1
- 0.14.3 - no method named `clear` found for struct `HashMap` in the current scope HOT 5
- Benchmark biaised due to no fence around input
- assertion failed: buckets.is_power_of_two() HOT 8
- Build breaks on nightly due to use of `stdsimd` rust feature in ahash 0.8.6 HOT 2
- Was swap-remove behavior ever considered when removing entries? HOT 10
- Consider returning to 1.63.0 MSRV HOT 1
- How to calculate the size of the hashbrown::HashMap at runtime? HOT 1
- LLVM failed to use the knowledge from a never-overflow assumption HOT 13
- Library test `map::test_map::test_clone_from_memory_leaks` errors with using uninitialized data under valgrind and miri
- update to ahash 0.8.7 or after to use new stdsimd feature portable_simd HOT 1
- Insertion performance with arena allocators HOT 3
- Do not grow the raw table when lots of deletion and insertion is performed HOT 3
- Unsound usages of unsafe implementation from `usize` to `T` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hashbrown.