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

Generate bindings during the build #155

Open
Sitin opened this issue Jan 15, 2025 · 2 comments
Open

Generate bindings during the build #155

Sitin opened this issue Jan 15, 2025 · 2 comments

Comments

@Sitin
Copy link

Sitin commented Jan 15, 2025

As far as I understand, the bindings are generated only when the app runs. This is confusing since I do not want to generate bindings each time the app starts.

Am I missing something? And, if not, what would be the most optimal way to move everything to the application build stage?

@Brendonovich
Copy link
Collaborator

Specta collects type information at runtime, not build time, so this won't be possible.
The recommended workflow is to only generating bindings in development using #[cfg(debug_assertions)] and then commit those to source control.

@oscartbeaumont
Copy link
Member

You can also use a unit test to generate them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants