I’m trying to move to building new rust plugins using the mod-plugin-builder docker route instead of my self-baked docker solution. My builds succeed, however they won’t load on the moddwarf. The browser just shows the cannot load plugin error. I also tried building dm-GrainDelay which should build fine with this tooling, but unfortunately this yields the same result.
Also, in order to get a successful build I had to install rust first and then add the relevant rustup targets (target architectures). I don’t know if that’s intended.
These plugins do work when they’re built with my own docker container. But I would prefer to use mod-plugin-builder now.
Some config for Rust got added about a month ago and isn’t part of the docker image yet. I’ll give the cbix/mod-plugin-builder image a go later. Is that the image you are using @spunktsch?
Running docker build -t mpb --build-arg platform=moddwarf-new . creates the docker image to compile for moddwarf-new. Will test the compiled plugin later today, but I’m pretty sure this solves my issue.
# adjust path as needed, only needed once per terminal session
source /path/to/mod-plugin-builder/local.env moddwarf-new
# trigger local build with the moddwarf-new toolchain
~/.cargo/bin/cargo build --target aarch64-unknown-linux-gnu \
--config 'target.aarch64-unknown-linux-gnu.rustflags=["-Ctarget-cpu=cortex-a35","-Clink-args=--sysroot=${STAGING_DIR}"]' \
--config 'target.aarch64-unknown-linux-gnu.linker="aarch64-modaudio-linux-gnu-gcc"'
maybe that cargo build command needs to become a shell alias…
Are the rust install lines commented because the cloud builder has rust installed already? Btw, I edited the Wiki page to explain you can build for other targets than just modduo, modduox & moddwarf.