diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ee9cca..701f4b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -160,7 +160,7 @@ jobs: - name: Build Gum documentation run: | cd frida-gum - cargo rustdoc --features "event-sink invocation-listener" -- --cfg doc_cfg + cargo rustdoc --features "event-sink invocation-listener" check-nostd: name: Check no_std runs-on: ubuntu-latest diff --git a/FRIDA_VERSION b/FRIDA_VERSION index 3832108..89d0462 100644 --- a/FRIDA_VERSION +++ b/FRIDA_VERSION @@ -1 +1 @@ -16.2.1 +16.2.5 diff --git a/frida-gum-sys/FRIDA_VERSION b/frida-gum-sys/FRIDA_VERSION index 3832108..89d0462 100644 --- a/frida-gum-sys/FRIDA_VERSION +++ b/frida-gum-sys/FRIDA_VERSION @@ -1 +1 @@ -16.2.1 +16.2.5 diff --git a/frida-gum-sys/build.rs b/frida-gum-sys/build.rs index b544310..6ec86af 100644 --- a/frida-gum-sys/build.rs +++ b/frida-gum-sys/build.rs @@ -196,7 +196,7 @@ fn main() { if target_os == "windows" { for lib in [ "dnsapi", "iphlpapi", "psapi", "winmm", "ws2_32", "advapi32", "crypt32", "gdi32", - "kernel32", "ole32", "secur32", "shell32", "shlwapi", "user32", + "kernel32", "ole32", "secur32", "shell32", "shlwapi", "user32", "setupapi", ] { println!("cargo:rustc-link-lib=dylib={lib}"); } diff --git a/frida-gum/Cargo.toml b/frida-gum/Cargo.toml index 26b4ae1..ce02430 100644 --- a/frida-gum/Cargo.toml +++ b/frida-gum/Cargo.toml @@ -34,4 +34,3 @@ maintenance = { status = "experimental" } [package.metadata.docs.rs] features = ["event-sink", "invocation-listener", "stalker-observer", "stalker-params"] -rustdoc-args = ["--cfg", "doc_cfg"] diff --git a/frida-gum/src/interceptor.rs b/frida-gum/src/interceptor.rs index 2cd552e..0031095 100644 --- a/frida-gum/src/interceptor.rs +++ b/frida-gum/src/interceptor.rs @@ -17,7 +17,7 @@ use core::ffi::c_void; #[cfg(feature = "invocation-listener")] mod invocation_listener; #[cfg(feature = "invocation-listener")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "invocation-listener")))] +#[cfg_attr(docsrs, doc(cfg(feature = "invocation-listener")))] pub use invocation_listener::*; /// Function hooking engine interface. @@ -47,7 +47,7 @@ impl<'a> Interceptor<'a> { /// The provided address *must* point to the start of a function in a valid /// memory region. #[cfg(feature = "invocation-listener")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "invocation-listener")))] + #[cfg_attr(docsrs, doc(cfg(feature = "invocation-listener")))] pub fn attach( &mut self, f: NativePointer, @@ -66,7 +66,7 @@ impl<'a> Interceptor<'a> { /// /// The provided address *must* point to a valid instruction. #[cfg(feature = "invocation-listener")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "invocation-listener")))] + #[cfg_attr(docsrs, doc(cfg(feature = "invocation-listener")))] pub fn attach_instruction( &mut self, instr: NativePointer, @@ -85,7 +85,7 @@ impl<'a> Interceptor<'a> { /// /// The listener *must* have been attached with [`Interceptor::attach()`]. #[cfg(feature = "invocation-listener")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "invocation-listener")))] + #[cfg_attr(docsrs, doc(cfg(feature = "invocation-listener")))] pub fn detach(&mut self, listener: NativePointer) { unsafe { gum_sys::gum_interceptor_detach( @@ -192,7 +192,7 @@ impl<'a> Interceptor<'a> { /// /// Should only be called from within a hook or replacement function. #[cfg(feature = "invocation-listener")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "invocation-listener")))] + #[cfg_attr(docsrs, doc(cfg(feature = "invocation-listener")))] pub fn current_invocation() -> InvocationContext<'a> { InvocationContext::from_raw(unsafe { gum_sys::gum_interceptor_get_current_invocation() }) } diff --git a/frida-gum/src/lib.rs b/frida-gum/src/lib.rs index bc07f61..091ac5c 100644 --- a/frida-gum/src/lib.rs +++ b/frida-gum/src/lib.rs @@ -53,7 +53,6 @@ )), no_std )] -#![cfg_attr(doc_cfg, feature(doc_cfg))] #![deny(warnings)] #![allow(clippy::needless_doctest_main)] #![allow(clippy::missing_safety_doc)] @@ -115,10 +114,10 @@ mod debug_symbol; pub use debug_symbol::*; #[cfg(feature = "backtrace")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "backtrace")))] +#[cfg_attr(docsrs, doc(cfg(feature = "backtrace")))] mod backtracer; #[cfg(feature = "backtrace")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "backtrace")))] +#[cfg_attr(docsrs, doc(cfg(feature = "backtrace")))] pub use backtracer::*; #[doc(hidden)] diff --git a/frida-gum/src/stalker.rs b/frida-gum/src/stalker.rs index 77fe753..1c8388b 100644 --- a/frida-gum/src/stalker.rs +++ b/frida-gum/src/stalker.rs @@ -55,11 +55,11 @@ mod transformer; pub use transformer::*; #[cfg(feature = "event-sink")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] pub struct NoneEventSink; #[cfg(feature = "event-sink")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] impl EventSink for NoneEventSink { fn query_mask(&mut self) -> EventMask { unreachable!() @@ -199,7 +199,7 @@ impl<'a> Stalker<'a> { /// If reusing an existing [`Transformer`], make sure to call [`Stalker::garbage_collect()`] /// periodically. #[cfg(feature = "event-sink")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] + #[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] pub fn follow( &mut self, thread_id: usize, @@ -231,7 +231,7 @@ impl<'a> Stalker<'a> { /// If reusing an existing [`Transformer`], make sure to call [`Stalker::garbage_collect()`] /// periodically. #[cfg(feature = "event-sink")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] + #[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] pub fn follow_me( &mut self, transformer: &Transformer, @@ -253,7 +253,7 @@ impl<'a> Stalker<'a> { /// If reusing an existing [`Transformer`], make sure to call [`Stalker::garbage_collect()`] /// periodically. #[cfg(not(feature = "event-sink"))] - #[cfg_attr(doc_cfg, doc(cfg(not(feature = "event-sink"))))] + #[cfg_attr(docsrs, doc(cfg(not(feature = "event-sink"))))] pub fn follow_me(&mut self, transformer: &Transformer) { unsafe { gum_sys::gum_stalker_follow_me( @@ -297,7 +297,7 @@ impl<'a> Stalker<'a> { } #[cfg(feature = "stalker-observer")] - #[cfg_attr(doc_cfg, doc(cfg(feature = "stalker-observer")))] + #[cfg_attr(docsrs, doc(cfg(feature = "stalker-observer")))] pub fn set_observer(&mut self, observer: &mut O) { let obs = stalker_observer_transform(observer); unsafe { diff --git a/frida-gum/src/stalker/event_sink.rs b/frida-gum/src/stalker/event_sink.rs index 49326e3..1699bf5 100644 --- a/frida-gum/src/stalker/event_sink.rs +++ b/frida-gum/src/stalker/event_sink.rs @@ -16,7 +16,7 @@ use { #[derive(FromPrimitive)] #[repr(u32)] -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] pub enum EventMask { None = gum_sys::_GumEventType_GUM_NOTHING as u32, Call = gum_sys::_GumEventType_GUM_CALL as u32, @@ -26,7 +26,7 @@ pub enum EventMask { Compile = gum_sys::_GumEventType_GUM_COMPILE as u32, } -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] #[derive(Debug, Clone, Hash, PartialEq, Eq)] pub enum Event { Call { @@ -52,7 +52,7 @@ pub enum Event { }, } -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] impl From for Event { fn from(event: GumEvent) -> Event { match num::FromPrimitive::from_u32(unsafe { event.type_ }).unwrap() { @@ -97,7 +97,7 @@ impl From for Event { } } -#[cfg_attr(doc_cfg, doc(cfg(feature = "event-sink")))] +#[cfg_attr(docsrs, doc(cfg(feature = "event-sink")))] pub trait EventSink { fn query_mask(&mut self) -> EventMask; fn start(&mut self); diff --git a/frida-gum/src/stalker/observer.rs b/frida-gum/src/stalker/observer.rs index b1f4e01..ea9b383 100644 --- a/frida-gum/src/stalker/observer.rs +++ b/frida-gum/src/stalker/observer.rs @@ -6,7 +6,7 @@ use {core::ffi::c_void, frida_gum_sys as gum_sys}; -#[cfg_attr(doc_cfg, doc(cfg(feature = "stalker-observer")))] +#[cfg_attr(docsrs, doc(cfg(feature = "stalker-observer")))] pub trait StalkerObserver { fn notify_backpatch(&mut self, backpatch: *const gum_sys::GumBackpatch, size: gum_sys::gsize); fn switch_callback( diff --git a/frida-sys/FRIDA_VERSION b/frida-sys/FRIDA_VERSION index 3832108..89d0462 100644 --- a/frida-sys/FRIDA_VERSION +++ b/frida-sys/FRIDA_VERSION @@ -1 +1 @@ -16.2.1 +16.2.5 diff --git a/frida-sys/build.rs b/frida-sys/build.rs index 2a835ca..00a30ac 100644 --- a/frida-sys/build.rs +++ b/frida-sys/build.rs @@ -68,7 +68,7 @@ fn main() { if target_os == "windows" { for lib in [ "dnsapi", "iphlpapi", "psapi", "winmm", "ws2_32", "advapi32", "crypt32", "gdi32", - "kernel32", "ole32", "secur32", "shell32", "shlwapi", "user32", + "kernel32", "ole32", "secur32", "shell32", "shlwapi", "user32", "setupapi", ] { println!("cargo:rustc-link-lib=dylib={lib}"); } diff --git a/frida/Cargo.toml b/frida/Cargo.toml index 7fa466f..f0d7e5e 100644 --- a/frida/Cargo.toml +++ b/frida/Cargo.toml @@ -22,4 +22,3 @@ maintenance = { status = "experimental" } [package.metadata.docs.rs] features = [] -rustdoc-args = ["--cfg", "doc_cfg"] diff --git a/frida/src/lib.rs b/frida/src/lib.rs index 0dde5b2..ea851d0 100644 --- a/frida/src/lib.rs +++ b/frida/src/lib.rs @@ -7,7 +7,6 @@ //! Frida bindings for Rust. -#![cfg_attr(doc_cfg, feature(doc_cfg))] #![deny(warnings)] #![deny(missing_docs)] #![allow(clippy::missing_safety_doc)]