-sys library design principles

In general, the -sys library should keep only unsafe C interface bindings and should not have redundant security abstractions.

However, for a pure Rust SDK like wasmedge-rs that we will eventually build, there should not be too many C binding interfaces. So, the wasmedge-sys library uses a thin layer of Rust wrappers, exposing only the appropriate interfaces for the upper layer of wasmedge-rs to abstract a more usable pure Rust SDK.

The interfaces exposed by the -sys library are supposed to be stable. That is, when the C interface changes, only the -sys library needs to be changed, not the upper-layer SDK.

Library interface description