create_rust_makefile
not Cargo workspace aware, target dir is hardcoded
#295
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
It appears that the
create_rust_makefile
is hardcoded to assume that the target dir is attarget
, instead of querying the cargo metadata. This makes it break when building a crate in a workspace (thecp
command to copy the output library fails), which is reasonably common. I'm not familiar with Ruby, Rake, or how the Makefile is generated and executed so please correct me if I'm wrong.Perhaps something like this could be useful? For example,
cargo metadata | jq -r .target_directory
.So far, I have only been able to work around this by setting the
RB_SYS_CARGO_TARGET_DIR
environment variable to the absolute path of the workspace target dir. I tried settingdo |r| r.target_dir = ...
but this doesn't seem to have any effect.The text was updated successfully, but these errors were encountered: