wasmi-labs / wasmi

WebAssembly (Wasm) interpreter.
https://wasmi-labs.github.io/wasmi/
Apache License 2.0
1.62k stars 287 forks source link

C API: Fix function name of compilation mode setter #1298

Closed turbolent closed 1 week ago

turbolent commented 1 week ago

config.h defines WASMI_CONFIG_PROP to define setters for configuration options as wasmi_config_##name##_set. Just like for all other configuration options, this macro is used for compilation_mode. However, the function is exported from the c_api crate with a different name.

Fix the exported name and make it consistent with the other configuration options.

turbolent commented 1 week ago

It might make sense to add some tests for the C API to ensure the headers and the library can be used successfully.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.59%. Comparing base (68205d4) to head (01da862). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1298 +/- ## ======================================= Coverage 81.59% 81.59% ======================================= Files 306 306 Lines 25308 25308 ======================================= + Hits 20649 20650 +1 + Misses 4659 4658 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Robbepop commented 1 week ago

It might make sense to add some tests for the C API to ensure the headers and the library can be used successfully.

Yes, totally! I wanted to do this a long time ago but there are so many things with a higher priority right now. Missing automated tests is why I flagged the C-API as experimental so far. Though, I am very happy about help and PRs. :)

Robbepop commented 1 week ago

@turbolent Thanks a lot for the fix!