Snap with Rust and C++

Hello. I’m the maintainer of the ZeroTier snap but recently we’ve started including some Rust components alongside our C++ core but I’m having difficulty figuring out how to structure my yaml so that both Rust+Cargo and Make are available.

I’ve spent hours banging my head on this and looking at examples but nothing seems to work.

I have a part called one that requires a C++ compiler, and make. This has never been an issue with something like:

parts:
  one:
    plugin: make
    source: .
    build-packages:
      - build-essential
      - libc++-dev
    make-parameters:
      - CXX=g++

But now with the building of a rust component triggered by a target in our makefile I’m finding that the remote-build system returns an error that it can’t find cargo. Makes sense. So I try to add it but nothing I try works. From my understanding things like the following could work? But obviously they don’t so my understanding is lacking.

parts:
  one:
    plugin: [make, rust]
    source: .
    build-packages:
      - build-essential
      - libc++-dev
    make-parameters:
      - CXX=g++
parts:
  one:
    plugin: make
    plugin: rust
    source: .
    build-packages:
      - build-essential
      - libc++-dev
    make-parameters:
      - CXX=g++
parts:
  one:
    plugin: rust
    source: .
    build-packages:
      - build-essential # hoping make is in build essentials
      - libc++-dev
    make-parameters: # in this case I get an error telling me make-parameters doesn't make sense
      - CXX=g++

Can anyone help clarify how this is supposed to be done?

EDIT: To me it doesn’t seem unreasonable for a part to require multiple plugins. Am I wrong in this? Do I need to break my part into multiple parts just to specify multiple plugins?

Thanks in advance!

Is anyone able to provide some guidance? Thanks!