1

I can find only javascript interfaces and documentation to interact with it, but nothing regarding rust? Feels a bit weird to use js library for rust application in rust application. Neither subxt seems to have possibility of using light client either.

1
  • If you get rust-js-rust working with smoldot then please post a link to your code so we can see it. I find rust to js can be a bit fiddly at times.
    – Squirrel
    Feb 14 at 9:42

1 Answer 1

2

If you look at the basic example you can see how to initialize a Smoldot client. Provide the chainspec of the chain you want to sync with and make JSON-RPC requests.

But I agree, a native rust interface would be really nice!

1
  • 1
    Agreed, but talking with Tomaka he said that there's lots of fun and games that smoldot does to make it work well in the browser and that for now it's a much better idea to do rust to js to smoldot (you will have a lot less pain). For desktop you can use smoldot as a crate - that has worked ok for me: github.com/gilescope/polkapipe/blob/main/src/smoldot_std.rs
    – Squirrel
    Feb 14 at 9:40

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.