aboutsummaryrefslogtreecommitdiff
path: root/ffi/multiarch
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-07-04 15:21:01 -0700
committeriximeow <me@iximeow.net>2021-07-04 15:21:01 -0700
commitbb2870e56d6c9a0a7b96be8287193a753e3a4391 (patch)
tree20cbc157d57ad6fc57a18392a3eec4a4f6b8d57c /ffi/multiarch
parent6f91a743a8e6bf720abdb0748bc6755f280b59de (diff)
add ffi wrappers for real mode, protected mode, and a multiarch build
Diffstat (limited to 'ffi/multiarch')
-rw-r--r--ffi/multiarch/Cargo.toml7
-rw-r--r--ffi/multiarch/src/lib.rs21
2 files changed, 27 insertions, 1 deletions
diff --git a/ffi/multiarch/Cargo.toml b/ffi/multiarch/Cargo.toml
index 370d39c..1632996 100644
--- a/ffi/multiarch/Cargo.toml
+++ b/ffi/multiarch/Cargo.toml
@@ -11,4 +11,9 @@ yaxpeax-arch = { version = "0.1.0", default-features = false }
[lib]
name = "yaxpeax_x86_ffi_multiarch"
path = "src/lib.rs"
-crate-type = ["staticlib"]
+crate-type = ["staticlib", "cdylib"]
+
+[features]
+default = ["fmt"]
+
+fmt = ["yaxpeax-x86/fmt"]
diff --git a/ffi/multiarch/src/lib.rs b/ffi/multiarch/src/lib.rs
index e69de29..61553fc 100644
--- a/ffi/multiarch/src/lib.rs
+++ b/ffi/multiarch/src/lib.rs
@@ -0,0 +1,21 @@
+#![no_std]
+
+#[panic_handler]
+fn panic(_info: &core::panic::PanicInfo) -> ! {
+ loop {}
+}
+
+#[path = "../../src/long_mode.rs"]
+mod long_mode;
+
+pub use long_mode::*;
+
+#[path = "../../src/protected_mode.rs"]
+mod protected_mode;
+
+pub use protected_mode::*;
+
+#[path = "../../src/real_mode.rs"]
+mod real_mode;
+
+pub use real_mode::*;