Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove smdhtool dependency by using cytryna library #50

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
265 changes: 258 additions & 7 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ tee = "0.1.0"
toml = "0.5.6"
clap = { version = "4.0.15", features = ["derive", "wrap_help"] }
shlex = "1.1.0"
image = { version = "0.24.7", default-features = false, features = ["png"] }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relating to my other comment, we could also consider lodepng (smdhtool uses the C++ version of this I think) or png as potentially lighter-weight alternatives, although image is nice in that we could potentially support other image formats. I'm not sure that we really need to support anything other than PNG though honestly, it's a pretty universal format that most users should be able to produce.

@Meziu any preference here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image without all of its default features doesn't have many dependencies, and with png feature it uses png crate under the hood

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't realize that cytryna itself had a direct dependency on image. It should be fine though, as you said its dependency tree is not too large

cytryna = { version = "0.1", default-features = false, features = ["smdh"], git = "https://github.com/Maccraft123/cytryna.git", rev = "ab2b9062d833911d87476f9e6cbb2cdb5517a579"}
2 changes: 1 addition & 1 deletion src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ impl Build {
fn callback(&self, config: &Option<CTRConfig>) {
if let Some(config) = config {
eprintln!("Building smdh: {}", config.path_smdh().display());
build_smdh(config, self.verbose);
build_smdh(config);

eprintln!("Building 3dsx: {}", config.path_3dsx().display());
build_3dsx(config, self.verbose);
Expand Down
Loading