Add shim for cargo#60
Conversation
d1eefae to
ac00000
Compare
|
It's minor, since we control the Docker image, but for native runners can we add a check in the shim that the |
|
It is a bit tricky because the way to check this depends on how rust was installed. If the system has One thing we could do is that if |
|
Gotcha. Okay, let's gate it behind existence of |
georgestagg
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me!
I have been testing this for a while on r-universe, and it works well.
We add a shim that makes cargo target
wasm32-unknown-emscriptenby default. Therefore R packages do not need any special casing to support wasm, they just need to invoke the default toolchains in the same way as they do for CC and CXX, etc.The only thing that makes this a bit tricky: when cross compiling, cargo writes binaries by default to a subdirectory of the output path. So to make the R packages work without changes as they would for a native build, the shim copies the binaries to one directory up, where they would appear normally.