Skip to content
Open
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
70 changes: 70 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ memflow = { version = "0.2", features = ["plugins"] }
# tracking issue: https://github.com/eminence/procfs/pull/309
[target.'cfg(target_os = "linux")'.dependencies]
procfs = { version = "=0.15.1", features = ["backtrace"] }
evdev = "0.13"

[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.61", features = [
Expand Down
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#[cfg(target_os = "linux")]
pub mod linux;
#[cfg(target_os = "linux")]
pub use linux::LinuxKeyboard as NativeKeyboard;
#[cfg(target_os = "linux")]
pub use linux::LinuxKeyboardState as NativeKeyboardState;
#[cfg(target_os = "linux")]
pub use linux::LinuxOs as NativeOs;
#[cfg(target_os = "linux")]
pub use linux::LinuxProcess as NativeProcess;
Expand All @@ -22,15 +26,15 @@ pub use self::windows::WindowsKeyboardState as NativeKeyboardState;
pub use self::windows::WindowsOs as NativeOs;
#[cfg(target_os = "windows")]
pub use self::windows::WindowsProcess as NativeProcess;
#[cfg(target_os = "windows")]
#[cfg(any(target_os = "windows", target_os = "linux"))]
use crate::keyboard::OsKeyboardVtbl;

use memflow::cglue;
use memflow::prelude::v1::*;

#[cfg(target_os = "windows")]
#[cfg(any(target_os = "windows", target_os = "linux"))]
cglue_impl_group!(NativeOs, OsInstance, { OsKeyboard });
#[cfg(not(target_os = "windows"))]
#[cfg(not(any(target_os = "windows", target_os = "linux")))]
cglue_impl_group!(NativeOs, OsInstance, {});

#[cfg_attr(feature = "plugins", os(name = "native", return_wrapped = true))]
Expand Down
Loading
Loading