Skip to content

Commit

Permalink
Make stable-api feature gated so it is non-breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks committed Jul 13, 2023
1 parent 938428f commit 0c0ae9e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/rb-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ fuzz = []
no-link-ruby = []
ruby-static = []
global-allocator = []
stable-api-compiled-fallback = [] # Fallback to compiled C API
stable-api = []
stable-api-compiled-fallback = ["stable-api"] # Fallback to compiled C API
stable-api-compiled-testing = [
"stable-api-compiled-fallback",
] # For testing the fallback in rb-sys (internal)
Expand Down
2 changes: 2 additions & 0 deletions crates/rb-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
pub mod bindings;
pub mod macros;
pub mod special_consts;
#[cfg(feature = "stable-api")]
pub mod stable_api;
pub mod tracking_allocator;
pub mod value_type;
Expand All @@ -16,6 +17,7 @@ pub use bindings::*;
pub use macros::*;
pub use ruby_abi_version::*;
pub use special_consts::*;
#[cfg(feature = "stable-api")]
pub use stable_api::StableApiDefinition;
pub use value_type::*;

Expand Down
2 changes: 2 additions & 0 deletions examples/rust_reverse/ext/rust_reverse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ rb-sys = { version = "0.9.79", path = "./../../../../crates/rb-sys", features =
crate-type = ["cdylib"]

[features]
default = ["stable-api-compiled-testing"]
test-feature = []
stable-api-compiled-testing = ["rb-sys/stable-api-compiled-testing"]

0 comments on commit 0c0ae9e

Please sign in to comment.