It's dirty and will break if there are spaces in the filename but Rust allows passing custom linker arguments.
Adding the static library to linker arguments allow it to be included during linkage on my machine:
custom_target('cargo-with-my_static_lib',
# ...
env: {
'CARGO_ENCODED_RUSTFLAGS': '\x1f'.join(['-C','link-args='+my_static_lib.full_path()]),
},
depends: my_static_lib,
)