ulid-rs icon indicating copy to clipboard operation
ulid-rs copied to clipboard

All feature combinations compile

Open TimLuq opened this issue 2 years ago • 2 comments

It was previously possible to disable the default std feature which caused the compilation to fail if the serde or uuid features were active. There were also tests which caused compilation errors when not building tests with the std feature.

This will however require rust 1.60 or higher due to the use of weak dependency features (i.e. std = ["rand", "serde?/std", "uuid?/std"]). This is a bump from the previous need for somewhere around 1.46-1.54 depending on compilation parameters. The documentation is also extended to include which features are needed for specific fns.

The new implementation for serde no longer does any heap allocation, so it is completely safe to use in a no_std context. It can also sneakily deserialize all reasonable kinds of data without the need to override with deserialize_with if the Deserializer supports it.

Fixes #57 and the specific use case in #52.

TimLuq avatar Jan 23 '23 00:01 TimLuq

Hey, I just ran into this issue in a project (using no-default-features with serde) noticed this has been open for a while with no ongoing conversation, I am open to pushing a lesser PR (making no-default-features work with serde through lazier means) if this one isn't likely to be merged

ultrabear avatar Mar 21 '25 09:03 ultrabear

Hey, I just ran into this issue in a project (using no-default-features with serde) noticed this has been open for a while with no ongoing conversation, I am open to pushing a lesser PR (making no-default-features work with serde through lazier means) if this one isn't likely to be merged

Same here, also ran into this and would much appreciate a partial solution.

DeppLearning avatar Jul 15 '25 16:07 DeppLearning