Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should running the codegen be part of the build process? #21

Open
Boddlnagg opened this issue Aug 25, 2016 · 0 comments
Open

Should running the codegen be part of the build process? #21

Boddlnagg opened this issue Aug 25, 2016 · 0 comments
Labels

Comments

@Boddlnagg
Copy link
Collaborator

We need to figure out whether running the code generator should be part of building the library. If so, we should have a Cargo build script to run it as part of building winrt-rust.

So far, I'm inclined to say that we should have gen.rs checked into the repository and distribute it that way. This has the following advantages:

  • We can generate it from the most recent version of the winmd files. I think that those are backwards compatible, so you can always compile against the latest version and if you use a feature that is not available on your local OS version, it will fail at runtime. (This can also be considered a disadvantage: you will get compile-time errors when you first run codegen from your local winmds, which is arguably better than runtime errors).
  • You don't need a C# compiler and .NET runtime to build the project (might be good for cross-compilation from Linux if that ever becomes a thing)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant