Help use the rust plugin. What am I not understanding?

I’ve used the rust plugin to build the Polkadot snap. It works now, but…

I found no useful documentation for the plugin itself, and, I feel I’m just trial-error my way throughout the process of getting it built. It has taken me probably 40+ hours to get here. If not more.

In the end, I feel that in my snapcraft.yaml ended up NOT using the plugin much at all, since I override-build and use various types of parts to manually setup the build, call on cargo, etc. where I thought the plugin should be able to help me alot more.

But, as I wrote above. None of the stuff mentioned in the docs helped me much and I think I might be better off just using the ‘nil’ plugin or possibly ‘dump’ and just a bunch of override- stuff. But what is the purpose of the (rust) plugins then at all for snap if people just end up scripting the whole thing?

Either I’m doing everything horribly wrong with the plugin/snapping or something is not right here for docs.

I’m happy to help with improving and all help appreciated to understand how the snapping should be better than countless hours trial-error.

Thanx to @soumyaDghosh for initial help here.

2 Likes

I had a fair struggle with this myself. I agree the documentation is useless.

Came up with this as a solution, particularly in the context of needing a specific rust version/channel to build:

1 Like

Is the rust plugin unmaintained?