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

Feature to hide dump_svg/dump_into_svg? #13

Open
grovesNL opened this issue Apr 19, 2022 · 2 comments
Open

Feature to hide dump_svg/dump_into_svg? #13

grovesNL opened this issue Apr 19, 2022 · 2 comments

Comments

@grovesNL
Copy link
Contributor

A lot of crates depending on this crate probably won't use dump_svg or dump_into_svg, so it would be great if we could remove this dependency by default and still have a way to opt-in (e.g. with a svg feature or similar).

I'd be happy to PR this if that sounds good.

grovesNL added a commit to grovesNL/etagere that referenced this issue Apr 19, 2022
@nical
Copy link
Owner

nical commented Apr 29, 2022

Hi, sorry for the delay I've been away from computers for a couple of weeks.

svg_fmt is a very tiny dependency, it should not affect build times significantly and since there's no polymorphism at play the compiler has a very easy time not inculding the dumping code into the binary if it isn't used.

Unless you have evidence that build times or release binary sizes are noticeably affected I would prefer to keep it without feature gate for simplicity's sake.

@grovesNL
Copy link
Contributor Author

No problem!

I'm targeting WebAssembly, so the concern is mostly about binary size and generally avoiding any extra dependencies. I'll check whether it's included into the final binary – maybe it's already being eliminated during build/linking like you mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants