Closed hmaarrfk closed 1 year ago
No, I'm not aware of a standard way to use cargo-c within the conda-forge framework. But, there wouldn't be anything magic about making it available. A command like cargo install cargo-c
just builds and installs a binary executable, while running cargo cinstall
just searches for a program named cargo-cinstall
and delegates to it. So, there wouldn't need to be any special support for cargo-c
here in the main rust
feedstock.
So the "gold-plated" way to set it up would be to simply create a new package for cargo-c
and include it as a build dep for your library.
Without creating a new package, your build scripts for librav1e
could do the cargo install cargo-c
themselves. You'd just have to make sure to clean up the installed files related to cargo-c since they shouldn't end up in the librav1e
package.
Either way, it might be a bit tricky for cross-compilation scenarios. I don't see a mention of cross-compiling in the cargo-c
README so I'd be a bit worried that maybe it doesn't have good support for that.
Ok thank you for the input.
It seems that a good requirement to add (at least for conda forge) is that if cargo-c were to be added, that it have support for cross compilation.
Otherwise, for the "cleanup" I'm "uninstalling" things at the end of my script, which seems to do the trick, though I need to inspect the tar more closely.
OK. It seems to me like this issue can be closed, but feel free to follow up if there's more to discuss.
Comment:
Do we have a standard way of using cargo-c at conda-forge?
I'm trying to build librav1e for ffmpeg. Thanks!
https://github.com/xiph/rav1e#building-the-c-api
xref: https://github.com/conda-forge/staged-recipes/pull/22814