Skip to content

Make svg_fmt dependency optional#12

Merged
nical merged 1 commit into
nical:masterfrom
hecrj:optional-svg-fmt
Jan 20, 2020
Merged

Make svg_fmt dependency optional#12
nical merged 1 commit into
nical:masterfrom
hecrj:optional-svg-fmt

Conversation

@hecrj

@hecrj hecrj commented Jan 18, 2020

Copy link
Copy Markdown
Contributor

Hey, thanks for this nice library!

We are planning to use it in iced_wgpu to generate image atlases: iced-rs/iced#154

I noticed the svg_fmt dependency is only used in the dump_svg function, which seems to satisfy a very specific use case. This PR makes this dependency optional.

@nical

nical commented Jan 20, 2020

Copy link
Copy Markdown
Owner

We are planning to use it in iced_wgpu to generate image atlases: iced-rs/iced#154

Cool!

I noticed the svg_fmt dependency is only used in the dump_svg function, which seems to satisfy a very specific use case. This PR makes this dependency optional.

svg_fmt is a super tiny crate so it won't make a difference in compile times or binary size, but I don't mind putting it behind a flag.

@nical nical merged commit 5531fc8 into nical:master Jan 20, 2020
@nical

nical commented Feb 27, 2020

Copy link
Copy Markdown
Owner

Sorry I ended up reverting this change. svg_fmt is tiny and takes less than half a second to build so I changed my mind and decided it wasn't worth the extra feature flag.

@hecrj

hecrj commented Feb 27, 2020

Copy link
Copy Markdown
Contributor Author

No worries. It just surprised me to see an svg_fmt dependency when running cargo tree, as the crate seems quite generic.

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 this pull request may close these issues.

2 participants