Skip to content

Commit

Permalink
remove hxcadaptor + bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty/Benediction committed Oct 8, 2023
1 parent 0ec1a8b commit a9142fd
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 52 deletions.
21 changes: 7 additions & 14 deletions Cargo.lock

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

14 changes: 8 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
resolver="2"
members = [
"hxcadaptor-sys",
"hxcadaptor",
"hxcfe-sys",
"hxcfe"
]

[workspace.dependencies]

hxcadaptor-sys = { version="0.1.4" }
hxcadaptor = { version="0.1.4" }
hxcfe-sys = { version="0.1.4" }
hxcfe = { version="0.1.4" }
hxcadaptor-sys = { version="0.1.5" }
hxcfe-sys = { version="0.1.5" }
hxcfe = { version="0.1.5" }

make-cmd = "0.1.0"
dunce = "1.0.4"
bindgen = "0.68.1"
copy_dir = "0.1.3"

[patch.crates-io]

hxcadaptor-sys = { path = "hxcadaptor-sys" }
hxcadaptor = { path = "hxcadaptor" }
hxcfe-sys = { path = "hxcfe-sys" }
hxcfe = { path = "hxcfe" }
10 changes: 5 additions & 5 deletions hxcadaptor-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hxcadaptor-sys"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
links = "hxcadaptor"
repository = "https://github.com/cpcsdk/hxcfe_rs"
Expand All @@ -14,10 +14,10 @@ readme = "../Readme.md"


[build-dependencies]
make-cmd = "0.1.0"
dunce = "1.0.4"
bindgen = "0.65.1"
copy_dir = "0.1.3"
make-cmd.workspace = true
dunce.workspace = true
bindgen.workspace = true
copy_dir.workspace = true

[lib]
name = "hxcadaptor_sys"
Expand Down
4 changes: 4 additions & 0 deletions hxcadaptor-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@ fn main() {
eprintln!("Generate bindings");
let bindings = bindgen::Builder::default()
.clang_arg(format!("-I{}", include_dir.display()))
.clang_arg("-FC:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.36.32532\\include")
.clang_arg(format!("--target={}", env::var("TARGET").unwrap()))
.clang_arg("-v")
.header("wrapper.h")
.generate_cstr(true)
// .emit_diagnostics()
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.generate()
.expect("Unable to generate bindings");
Expand Down
5 changes: 4 additions & 1 deletion hxcadaptor-sys/wrapper.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include <stdio.h>
//#include <stdio.h>
#include <stddef.h>
struct _IO_FILE;
typedef struct _IO_FILE FILE;

// cpy pasted stuff needed for bindgen
#ifndef _W64
Expand Down
14 changes: 0 additions & 14 deletions hxcadaptor/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion hxcadaptor/src/lib.rs

This file was deleted.

12 changes: 6 additions & 6 deletions hxcfe-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hxcfe-sys"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
links = "hxcfe"
repository = "https://github.com/cpcsdk/hxcfe_rs"
Expand All @@ -11,13 +11,13 @@ readme = "../Readme.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hxcadaptor.workspace = true
hxcadaptor-sys.workspace = true

[build-dependencies]
make-cmd = "0.1.0"
dunce = "1.0.4"
bindgen = "0.65.1"
copy_dir = "0.1.3"
make-cmd.workspace = true
dunce.workspace = true
bindgen.workspace = true
copy_dir.workspace = true

[lib]
name = "hxcfe_sys"
Expand Down
1 change: 1 addition & 0 deletions hxcfe-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ fn main() {
.clang_arg(format!("-I{}", include_dir.display()))
.header("wrapper.h")
.clang_arg(format!("--target={}", env::var("TARGET").unwrap()))
.generate_cstr(true)
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.generate()
.expect("Unable to generate bindings");
Expand Down
3 changes: 0 additions & 3 deletions hxcfe-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

pub use hxcadaptor;
pub use hxcadaptor::hxcadaptor_sys;

#[cfg(test)]
mod test {
use crate::{hxcfe_deinit, hxcfe_init};
Expand Down
2 changes: 1 addition & 1 deletion hxcfe/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hxcfe"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
repository = "https://github.com/cpcsdk/hxcfe_rs"
authors = ["Romain Giot <giot.romain@gmail.com>"]
Expand Down
2 changes: 1 addition & 1 deletion hxcfe/src/img_loaders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl<'mngr> ImgLoader<'mngr> {
} else {
Ok(Img {
floppydisk,
hxcfe: (unsafe { &*self.manager }).hxcfe,
hxcfe: ( &*self.manager ).hxcfe,
})
}
}
Expand Down

0 comments on commit a9142fd

Please sign in to comment.