This is a rough port of OpenBSD's cargo ports module for porting Rust
applications. I did this as an experiment a while back. It works ok
for an example ripgrep port (even in Poudriere). I'm not exactly sure
how to move forward with this though.
I've added a port of ripgrep and bingrep to demonstrate how it can be
used.
Rough port creation outline is as follows:
- Add USES=cargo
- Add distfile, make makesum
- make patch
- Run make cargo-crates-1 to generate CARGO_CRATES from the sources. This locks dependencies to the versions specified in the Cargo.toml file (though it should be possible to change the dependencies to a different version should the need arise). Add the output to the port Makefile.
- Rerun make makesum to add all checksums for the Crates
- make clean
- make