I have some rust libraries and they have don't have a no_std
implementation.
Can I use runtime interface to call those libraries?
1 Answer
Yes you can use runtime-interface
to create a host function that calls your rust library. However, you need to be aware that any call to the host is not for free and adds some overhead.
You also need to ensure that the code you are calling is deterministic, if you want to call this code from some on chain code. This means that it should always return the same result, when you pass the same arguments.
When you are building a Parachain, you will also not be able to use any custom host functions from your on chain code. The host functions need to be available on the relay chain and that clearly isn't working for custom host functions.