Restructure building the C API (#7341)This commit introduces a wrapper crate which is now the new "real" CAPI. The purpose of this change is to enable using LTO when building theC API. Currently
Restructure building the C API (#7341)This commit introduces a wrapper crate which is now the new "real" CAPI. The purpose of this change is to enable using LTO when building theC API. Currently LTO is disabled because one of the crate types of the CAPI is an "rlib" which means that it can't have LTO performed due torustc limitations. The solution here is to remove the "cdylib" and"staticlib" crate types from the "wasmtime-c-api" crate, rename thatcrate to "wasmtime-c-api-impl", and reintroduce 'wasmtime-c-api' as anew crate which wraps the previous crate and reexports it.This way LTO can be enabled when just building the artifacts and the usecase from #6765 is still satisfied by having a crate that can be linkedto from Rust. Locally this reduces the size of the C API artifact for meby nearly 1M.
show more ...