Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cdylib opt-in on latest nightly #2770

Merged
merged 3 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
toolchain: nightly
override: true

- name: Install cbindgen
Expand All @@ -171,8 +171,8 @@ jobs:
env:
RUSTFLAGS: --cfg hyper_unstable_ffi
with:
command: build
args: --features client,http1,http2,ffi
command: rustc
args: --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib

- name: Make Examples
run: cd capi/examples && make client
Expand Down
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ include = [
#"build.rs",
]

[lib]
crate-type = ["lib", "staticlib", "cdylib"]

[dependencies]
bytes = "1"
futures-core = { version = "0.3", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions capi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Because of that, it's only accessible if `--cfg hyper_unstable_ffi` is passed to

## Building

The C API is part of the Rust library, but isn't compiled by default. Using `cargo`, it can be compiled with the following command:
The C API is part of the Rust library, but isn't compiled by default. Using a nightly release of `cargo`, starting with `nightly-2022-03-02`, it can be compiled with the following command:

```
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo +nightly rustc --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
```