Closed KodrAus closed 7 years ago
Ok, so the tool should work like this:
dev
Build a package for just the current platform (use the same process, but no additional platforms are available).
Bundle up the one library into a nupkg and copy to some destination (this is expected to be some local nuget cache)
pack
Build a package for the given platforms, expecting the system this is run on is capable of linking everything together.
So the little build tool I wrote here turned out pretty well. If I was going to do it properly it would need some thought though. What I think would work well is taking that work and turning it into a tool for packaging Rust libs as .NET nuget packages.
The nuspec info could all be pulled from the cargo.toml, then it's just a question of what platforms to target. For example, the
Libuv
package has the following nuspec:The actual output just goes in a root
runtimes
folder:This can then be copied into a package directory. I'll keep the other functionality for building, running tests and copying around in case it's still useful.