Skip to content

Commit

Permalink
chore(ffi): Use stable rust for building C API (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo authored Sep 22, 2022
1 parent 8ae73ca commit bd7928f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
toolchain: stable
override: true

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

- name: Make Examples
run: cd capi/examples && make client
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 a nightly release of `cargo`, starting with `nightly-2022-03-02`, it can be compiled with the following command:
The C API is part of the Rust library, but isn't compiled by default. Using `cargo`, staring with `1.64.0`, it can be compiled with the following command:

```
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo +nightly rustc --features client,http1,http2,ffi -Z unstable-options --crate-type cdylib
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo rustc --features client,http1,http2,ffi --crate-type cdylib
```
4 changes: 2 additions & 2 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
//! ## 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:
//! `cargo`, staring with `1.64.0`, it can be compiled with the following command:
//!
//! ```notrust
//! RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi
//! RUSTFLAGS="--cfg hyper_unstable_ffi" cargo rustc --features client,http1,http2,ffi --crate-type cdylib
//! ```
// We may eventually allow the FFI to be enabled without `client` or `http1`,
Expand Down

0 comments on commit bd7928f

Please sign in to comment.