2

I'm trying to implement a Substrate client on IoT, to send a basic extrinsic that stores as an example, a key-value. This code needs to run on ARM or ESP32 kinds of chips.

Are there any suggestions on which library to use?

The polkadot_api_cpp is too old because it supports only up to substrate metadata V7. Also, I've tried to no_std the Rust substrate-api-client library without success.

I'm considering building a C client to build/send a transaction to Substrate, but I really wanna be sure that there's no alternative.

4
  • 1
    I'm not familiar with subxt enough to know how feasible no_std support is, but there's an old issue for it github.com/paritytech/subxt/issues/159. Maybe you could chime in there. The hard part about creating a substrate client is that it needs to be "dynamic" in order to be useful long-term, i.e. it most generate its API based on substrate's chain metadata. This might also be of interest to you: cyrilfougeray.com/2020/12/14/leger-rust-wallet-1.html
    – André
    Feb 25, 2022 at 16:00
  • try the go-substrate-rpc-client, it's platform-independent. Feb 25, 2022 at 16:06
  • @André Thanks for the issue link ! I'm aware that the client has to have this "dynamic" structure (using metadata) to adapt the new futur chain spec. My goal is to first have a strictly (chain) specific implementation first, but maybe that isn't best idea ? It's a shame Rust/Substrate makes it difficult to target IoT.
    – lucgerrits
    Feb 25, 2022 at 16:19
  • @ChinoChang Thanks for the tip, unfortunately I've no experience in Go...
    – lucgerrits
    Feb 25, 2022 at 16:19

2 Answers 2

3

I think making subxt be no std compatible would seem to be the best way to go. https://github.com/paritytech/subxt/issues/208

No one has yet given it a crack with a PR, but all the on chain code is no_std so it's probably doable. (There are a few other IOT parachain/threads so maybe check with them too - https://parachains.info/details/nodle_iot and https://www.radom.network/ )

2

You can see a list of tools here:

Note that some are actively maintained, others are not.

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.