svgo

Crates.iosvgo
lib.rssvgo
version0.0.4
sourcesrc
created_at2024-07-21 01:47:56.053758
updated_at2024-10-06 00:12:16.682459
descriptionSVG Optimizer for Rust
homepagehttps://github.com/EstebanBorai/svgo
repositoryhttps://github.com/EstebanBorai/svgo
max_upload_size
id1310034
size59,114
Esteban Borai (EstebanBorai)

documentation

README

SVGO Rust Logo

SvgOptimizer

SVG Optimizer for Rust & WebAssembly (WASM)

Early development notice

Motivation

Have a SVGO Rust implementation to optimize SVG files, which also exposes a WebAssembly (WASM) interface so its functionality can be used in the browser.

Features

The following list provides an overview of the features that are planned to be implemented as well as the ones that are already implemented.

Feel free to open an issue if you want to request a feature or if you want to contribute to the project by implementing any of these features.

Behavior

  • Multipass

Source Code

  • Prettify
  • Uglify

General

  • Clean up Attribute Whitespace
  • Clean IDs
  • Round/Rewrite Number Lists
  • Round/Rewrite Numbers
  • Collapse useless groups
  • Minify Colors
  • Round/Rewrite Paths
  • Shapes to (smaller) Paths
  • Style to Attributes
  • Round/Rewrite Transforms
  • Merge Paths
  • Move Attributes to Parent Group
  • Move Group Attributes to Elements
  • Prefer viewBox to width/height
  • Sort Attributes
  • Optimize single-path SVGs
  • Tidy Enable Background

Removes

  • Comments
  • <desc> tags
  • Doctype
  • Editor Data
  • Empty Attributes
  • Empty Containers
  • Empty Text
  • Hidden Elements
  • Metadata
  • Unneeded Group Attributes
  • Raster Images
  • <title>
  • unknowns and defaults
  • unused defs
  • unused namespaces
  • useless stroke and fill
  • viewBox
  • XML instructions
  • XMLNS Attribute
  • <style> elements

Inspiration

This project is inspired by the SVGO project available for Node.js ecosystem.

License

This project is licensed under the MIT license.

Commit count: 21

cargo fmt