Browse Source

Move ``docstring-to-rustdoc`` to its own crate

pull/75/head
TechiePi 2 years ago
parent
commit
95756f7b73
  1. 2
      Cargo.toml
  2. 8
      ctru-sys/Cargo.toml
  3. 2
      ctru-sys/bindgen.sh
  4. 7
      ctru-sys/docstring-to-rustdoc/Cargo.toml
  5. 4
      ctru-sys/docstring-to-rustdoc/src/main.rs

2
Cargo.toml

@ -1,5 +1,5 @@
[workspace] [workspace]
members = ["ctru-rs", "ctru-sys"] members = ["ctru-rs", "ctru-sys", "ctru-sys/docstring-to-rustdoc"]
[patch.'https://github.com/Meziu/ctru-rs'] [patch.'https://github.com/Meziu/ctru-rs']
# Make sure all dependencies use the local ctru-sys package # Make sure all dependencies use the local ctru-sys package

8
ctru-sys/Cargo.toml

@ -8,11 +8,3 @@ edition = "2021"
[dependencies] [dependencies]
libc = { version = "0.2.121", default-features = false } 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"]

2
ctru-sys/bindgen.sh

@ -29,6 +29,6 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \
-D__3DS__ \ -D__3DS__ \
> src/bindings.rs > 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 cargo fmt --all

7
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" }

4
ctru-sys/src/bin/docstring-to-rustdoc.rs → ctru-sys/docstring-to-rustdoc/src/main.rs

@ -2,8 +2,8 @@
//! //!
//! # Usage //! # Usage
//! //!
//! `cargo run --bin docstring-to-rustdoc --features="build-binary" -- [location of the bindings.rs]` //! `cargo docstring-to-rustdoc [location of the bindings.rs]`
//! Example: `cargo run --bin docstring-to-rustdoc --features="build-binary" -- src/bindings.rs` //! Example: `cargo docstring-to-rustdoc src/bindings.rs`
//! //!
//! # Transformations //! # Transformations
//! //!
Loading…
Cancel
Save