Move the C API to a separate crate (#818)
* Move the C API to a separate crate This commit moves the C API from `crates/api/src/wasm.rs` to `crates/capi/src/lib.rs` to be located in a separate crate. There's a number of reasons for this: * When a Rust program depends on the `wasmtime` crate, there's no need to compile in the C API. * This should improve compile times of the `wasmtime` crate since it's not producing artifacts which aren't always used. * The development of the C API can be guaranteed to only use the public API of the `wasmtime` crate itself. Some CI pieces are tweaked and this overall shouldn't have much impact on users, it's intended that it's a cleanup/speedup for developers! * Disable rustdoc/tests for capi * Review feedback * Add back in accidentally deleted comment * More renamings * Try to fix dotnet build
This commit is contained in:
committed by
Dan Gohman
parent
7f997fe7a6
commit
364fa994ed
@@ -1,6 +1,7 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WasmtimeVersion>0.8.0</WasmtimeVersion>
|
||||
<WasmtimeVersion>0.8.0</WasmtimeVersion>
|
||||
<WasmtimeLibraryName>wasmtime</WasmtimeLibraryName>
|
||||
<WasmtimePackageName>wasmtime-c-api</WasmtimePackageName>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<LibraryExtension Condition="'$(LibraryExtension)' == ''">.so</LibraryExtension>
|
||||
<WasmtimeLibraryFilename>$(LibraryPrefix)$(WasmtimeLibraryName)$(LibraryExtension)</WasmtimeLibraryFilename>
|
||||
<WasmtimeOutputPath>$(MSBuildThisFileDirectory)../../../target/$(Configuration.ToLower())</WasmtimeOutputPath>
|
||||
<BuildWasmtimeCommand Condition="'$(Configuration)' == 'Release'">cargo build --release -p $(WasmtimeLibraryName)</BuildWasmtimeCommand>
|
||||
<BuildWasmtimeCommand Condition="'$(BuildWasmtimeCommand)' == ''">cargo build -p $(WasmtimeLibraryName)</BuildWasmtimeCommand>
|
||||
<BuildWasmtimeCommand Condition="'$(Configuration)' == 'Release'">cargo build --release -p $(WasmtimePackageName)</BuildWasmtimeCommand>
|
||||
<BuildWasmtimeCommand Condition="'$(BuildWasmtimeCommand)' == ''">cargo build -p $(WasmtimePackageName)</BuildWasmtimeCommand>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user