diff --git a/Cargo.lock b/Cargo.lock index 691c4a05ff4e..184de5184148 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2477,6 +2477,8 @@ version = "0.1.0" dependencies = [ "magnus", "opendal", + "rb-sys", + "rb-sys-env", ] [[package]] @@ -3262,18 +3264,18 @@ dependencies = [ [[package]] name = "rb-sys" -version = "0.9.69" +version = "0.9.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a18381b4e31d2c3d0f7bdbcce22d53f6ff18131842d1fec1adcef6527ff573" +checksum = "3e36bdb8be5f395264fb4345a5f6c13dac307ed3be3bccf6305b57835981c605" dependencies = [ "rb-sys-build", ] [[package]] name = "rb-sys-build" -version = "0.9.69" +version = "0.9.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e211890b3bd43f4d90111b7bfd863b519e3c62a5118f1bf620a0ffb43ec7f3" +checksum = "b56f8993adac385ed6208f0dc62f99181eb0676dea50bac7bc3d36a86bb9429b" dependencies = [ "bindgen 0.60.1", "lazy_static", diff --git a/bindings/ruby/Cargo.toml b/bindings/ruby/Cargo.toml index f888f788be5a..c070193d5d2f 100644 --- a/bindings/ruby/Cargo.toml +++ b/bindings/ruby/Cargo.toml @@ -34,4 +34,8 @@ name = "opendal_ruby" [dependencies] magnus = { version = "0.5", features = ["bytes-crate"] } +rb-sys = { version = "0.9.72", default-features = false } opendal.workspace = true + +[build-dependencies] +rb-sys-env = "0.1.2" diff --git a/bindings/ruby/build.rs b/bindings/ruby/build.rs new file mode 100644 index 000000000000..d0cc49f1f3d8 --- /dev/null +++ b/bindings/ruby/build.rs @@ -0,0 +1,5 @@ +fn main() -> Result<(), Box> { + let _ = rb_sys_env::activate()?; + + Ok(()) +}