diff --git a/Cargo.toml b/Cargo.toml index a32362d..d7694bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = ["ctru-rs", "ctru-sys"] +members = ["ctru-rs", "ctru-sys", "ctru-sys/docstring-to-rustdoc"] [patch.'https://github.com/Meziu/ctru-rs'] # Make sure all dependencies use the local ctru-sys package diff --git a/ctru-sys/Cargo.toml b/ctru-sys/Cargo.toml index c505fae..6367b13 100644 --- a/ctru-sys/Cargo.toml +++ b/ctru-sys/Cargo.toml @@ -8,11 +8,3 @@ edition = "2021" [dependencies] libc = { version = "0.2.121", default-features = false } -doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.2", rev = "573f483ad63ab4662650961998d3ed093a703983", optional = true } - -[features] -build-binary = ["doxygen-rs"] - -[[bin]] -name = "docstring-to-rustdoc" -required-features = ["build-binary"] diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh index d6c8556..c70951a 100755 --- a/ctru-sys/bindgen.sh +++ b/ctru-sys/bindgen.sh @@ -29,6 +29,6 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ -D__3DS__ \ > src/bindings.rs -cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs +cargo docstring-to-rustdoc src/bindings.rs cargo fmt --all diff --git a/ctru-sys/docstring-to-rustdoc/Cargo.toml b/ctru-sys/docstring-to-rustdoc/Cargo.toml new file mode 100644 index 0000000..9b38256 --- /dev/null +++ b/ctru-sys/docstring-to-rustdoc/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "docstring-to-rustdoc" +version = "0.1.0" +edition = "2021" + +[dependencies] +doxygen-rs = { git = "https://github.com/Techie-Pi/doxygen-rs.git", version = "0.2.2", rev = "573f483ad63ab4662650961998d3ed093a703983" } \ No newline at end of file diff --git a/ctru-sys/src/bin/docstring-to-rustdoc.rs b/ctru-sys/docstring-to-rustdoc/src/main.rs similarity index 81% rename from ctru-sys/src/bin/docstring-to-rustdoc.rs rename to ctru-sys/docstring-to-rustdoc/src/main.rs index 10ffed6..43fa96b 100644 --- a/ctru-sys/src/bin/docstring-to-rustdoc.rs +++ b/ctru-sys/docstring-to-rustdoc/src/main.rs @@ -2,8 +2,8 @@ //! //! # Usage //! -//! `cargo run --bin docstring-to-rustdoc --features="build-binary" -- [location of the bindings.rs]` -//! Example: `cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs` +//! `cargo docstring-to-rustdoc [location of the bindings.rs]` +//! Example: `cargo docstring-to-rustdoc src/bindings.rs` //! //! # Transformations //!