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

Always provide const values for rust #1066

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

crop2000
Copy link
Contributor

This commit removes the -uim flag for rust
and provides the const values by default
and makes use of these const values
in get_num_inputs and get_num_outputs
it also simplifies how this functions are generated they are now just a string

To create arrays for compute_arrays() one needs to know the array sizes at compile time. The const definitions provide these.

@crop2000
Copy link
Contributor Author

@bluenote10 I am quite sure that this will not break anything. but can you have a look.

Copy link
Contributor

@bluenote10 bluenote10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, and I can confirm that there is no breaking change:

Nitpick: I would have generated these pub const FAUST_XXX expressions somewhere at the top of the file instead of the very bottom, because such constants are traditionally placed more in the "header" area of a file (and the other PR also places the FaustFloat alias on top, which plays a similar role).

@crop2000
Copy link
Contributor Author

I moved the const definition just before the struct definition.
I think this pr is ready for merging

This commit removes the -uim flag for rust
and provides the const values by default
and makes use of these const values
in get_num_inputs and get_num_outputs
it also simplifies how this functions are generated
they are now just a string
@crop2000
Copy link
Contributor Author

@sletz are you open to merge this?

@sletz sletz merged commit c24f3e1 into grame-cncm:master-dev Oct 19, 2024
3 checks passed
@sletz
Copy link
Member

sletz commented Oct 19, 2024

Thanks.

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

Successfully merging this pull request may close these issues.

3 participants