You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main feature of this crate is that it is automatically generated. This allows to maintain the current version with minimal costs (as a pet project, no real development required).
A current implementation of generator works in few steps:
parse FMOD C headers to collect API definition
parse FMOD documentation additionally to fix some introspection issues
generate FFI (no problems here, the result is even better than bindgen)
apply some conversion rules to map FFI into Rust idiomatic API
But real using experience over more than a year has shown that this implementation does not work well enough.
The main problem is that the C API does not provide full type introspection (especially for arrays and mutable structures via *pointers). Together with inconsistent naming this leads to the fact that in some places the generated code is still ugly or does not implement the API correctly.
The main feature of this crate is that it is automatically generated. This allows to maintain the current version with minimal costs (as a pet project, no real development required).
A current implementation of generator works in few steps:
bindgen
)But real using experience over more than a year has shown that this implementation does not work well enough.
The main problem is that the C API does not provide full type introspection (especially for arrays and mutable structures via *pointers). Together with inconsistent naming this leads to the fact that in some places the generated code is still ugly or does not implement the API correctly.
For example:
object_3_dupdate
,Convolutionreverb
, etcSolution
We can use FMOD C# API version to implement new generator (or Unity version if it is different?). It solves the problem mentioned:
The main task here is to implement matching and calling of FFI functions.
The text was updated successfully, but these errors were encountered: