2

I have a pallet I'm working on that wants to deal with emojis (allowing emojis to be submitted, stored, etc). i found Rust crate unic_emoji_char which I think would help greatly, but can't get it to work in a pallet. I'm assuming it has something to do with std.

To the cargo.toml I add: unic-emoji-char = { version = "0.9.0", default-features = false }

And in std: "unic-emoji-char/std",

Snips of errors when I cargo test:

error: failed to select a version for `unic-emoji-char`.
...
the package `pallet-rmrk-core` depends on `unic-emoji-char`, with features: `std` but `unic-emoji-char` does not have these features.

Guessing I just can't use this library, but are there any suggestions for how to do emoji-checking with Rust/Substrate?

1 Answer 1

3

The std feature is not something that works out of box. It is just a convention that crate authors may or may not stick to.

As you can see, there is no std feature in Cargo.toml of unic-emoji-char here.

Apart from that, compiling code to a runtime implies using the no_std environment (see here for more details) and the crate in question does not seem to declare that in its lib.rs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.