randomPoison / cs-bindgen

Experiment in using Rust to build a library that can be loaded by Unity across multiple platforms
4 stars 0 forks source link

Automatically perform code generation for integration tests #9

Open randomPoison opened 4 years ago

randomPoison commented 4 years ago

Currently when updating the integration test suite you have to manually run cargo run -p builder in order to update the generated bindings for the integration test. It would be nice if running dotnet test (or dotnet build) automatically performed the code generation for you. This should be possible since .NET Core uses MSBuild, which has pretty robust support for custom build steps. In theory, getting this working should be as simple as adding a custom pre-build step that runs cargo run -p builder.

randomPoison commented 4 years ago

It would also be nice to automatically format the generated code. This should be as simple as running the dotnet-format command, though there may be some trickery around either detecting if it's installed or adding it as some kind of dev dependency to be installed automatically.