This patch changes the directory where the C header files are
generated, from `CARGO_MANIFEST_DIR` to `OUT_DIR`. The goal is: When
`wasm-runtime-c-api` is used as a dependency of another Rust project,
then the C header files are accessible in the `target/` directory
(i.e. the `OUT_DIR`).
Also, since `rustc` has a `--out-dir` directory, it increases the
flexibility of this approach: The user can generate the C header files
where she wants.
When requiring `wasmer-runtime-c-api`, I get the following conflicts:
```
error: failed to select a version for `serde_derive`.
... required by package `cbindgen v0.7.1`
... which is depended on by `wasmer-runtime-c-api v0.2.1`
... which is depended on by `foo v0.1.0 (/private/tmp/foo)`
versions that meet the requirements `= 1.0.58` are: 1.0.58
all possible versions conflict with previously selected packages.
previously selected package `serde_derive v1.0.89`
... which is depended on by `wasmer-runtime-core v0.2.1`
... which is depended on by `wasmer-runtime-c-api v0.2.1`
... which is depended on by `foo v0.1.0 (/private/tmp/foo)`
failed to select a version for `serde_derive` which could resolve this conflict
```
This issue resolves by updating `cbindgen` to 0.8.
This patch cleans several warnings where mutable bindings are declared
but used only as immutable bindings.
It's a little bit opinionated patch. I think it's interesting to use
`const` pointers as much as possible.
This patch removes `unsafe { … }` blocks inside `unsafe` functions.
This patch also removes some warnings about camel case. All structures
with a C representation are automatically not mangle, and allow non
camel case.