Since this PR written from the changes not yet applied to master, file changes are a bit too verbose including non-PR changes. Actual change is only resides this file
As subsequent implementation of PR #853, implements C language backend for generating dynamic language bindings on runtime.
Two new structs are defined and exposed to public:
CDynamicBindingBackend
CDynamicBindingConfig
And user can use this to generate runtime-loadable C binding instead of static binding using following scheme.
This will generate global symbols and functions as loadable fields within the struct named as user provided USER_API_STRUCT string.
The generated loader methods will accept the Api definition struct and user-provided platform-agnostic API loader interface structure. Basically the generated loader methods is invisible to user. Once the user writes #define INCLUDE_CBINDGEN_LOADER_{USER_API_STRUCT} prior to the inclusion of generated header, then the loader methods is visible to the user as inline function.
As subsequent implementation of PR #853, implements C language backend for generating dynamic language bindings on runtime.
Two new structs are defined and exposed to public:
CDynamicBindingBackend
CDynamicBindingConfig
And user can use this to generate runtime-loadable C binding instead of static binding using following scheme.
This will generate global symbols and functions as loadable fields within the struct named as user provided
USER_API_STRUCT
string.The generated loader methods will accept the Api definition struct and user-provided platform-agnostic API loader interface structure. Basically the generated loader methods is invisible to user. Once the user writes
#define INCLUDE_CBINDGEN_LOADER_{USER_API_STRUCT}
prior to the inclusion of generated header, then the loader methods is visible to the user as inline function.Outputs with
USER_API_STRUCT
as"MyApiStruct"
TODOs
CDynamic
be merged into crate-wiseConfig
?