Skip to content

Create C API#6

Open
ChunMinChang wants to merge 14 commits intomasterfrom
capi-crate
Open

Create C API#6
ChunMinChang wants to merge 14 commits intomasterfrom
capi-crate

Conversation

@ChunMinChang
Copy link
Member

@ChunMinChang ChunMinChang commented Apr 13, 2020

To use this crate in cubeb on Windows as well, we need to create some C APIs.

`--all-targets` and `--all-features` are removed as well since they are
unnecessary
We need to run `cargo clean` before `cargo test`. Otherwise, if there is
an audio_mixer crate built before, we will end up having a "multiple
matching crates for `audio_mixer`" error.
- Instead of using Makefile, using command line to run `cargo build`
directly to generate the static FFI library that will be linked to
audio_mixer.c
- Fix the build error on Linux and Windows
- Rename mixer-core to core
- Rename mixer-capi to capi
The original run_sanitizers.sh is moved to the `core` folder. By doing
so, we don't need to specify the `package` run in `cargo test` by `-p`,
and the paths to manifests `Cargo.toml` and `Cargo_ori.toml` is updated
as well.

The run_sanitizers.sh in the top folder now is just a proxy to call
`run_sanitizers.sh` in core folder.
Reuse pre-built FFI library is the easiest way to avoid linking error
for undefined asan/tsan/... symbols.
@ChunMinChang ChunMinChang self-assigned this Apr 13, 2020
@ChunMinChang ChunMinChang requested a review from padenot April 13, 2020 17:12
@ChunMinChang ChunMinChang linked an issue Apr 13, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create C API

2 participants