MCPcopy Index your code
hub / github.com/abey79/vsvg

github.com/abey79/vsvg @v0.5.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.5.0 ↗ · + Follow
832 symbols 1,699 edges 110 files 104 documented · 12%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

The vsvg project (incl. whiskers and msvg)

What's this?

whiskers msvg vsvg/vsvg-viewer
image image image
whiskers is a Rust-based, Processing-like interactive sketching environment for generative plotter art. It's fast, it's web-ready, and it's a delight to use.

Try it here! | msvg is a (WIP!) fast browser for SVG collections. It smoothly addresses the challenge of browsing through large collections of generated SVGs, e.g. to find the best looking ones for plotting. | vsvg and vsvg-viewer are the core crates behind whiskers and msvg. They implement the core data structures for manipulating vector data for plotter applications, as well as an ultra-performant, cross-platform, hardware-accelerated, and easy-to-extend viewer. |

Documentation

The documentation is WIP—watch this space for updates.

In the meantime, each crate of the vsvg project has its own README with additional information: - whiskers - whiskers-widgets - whiskers-derive - msvg - vsvg - vsvg-viewer - vsvg-cli

Installing

There is currently no facilities to install vsvg unfortunately. It must be compiled and installed from source. Fortunately, this is actually not much more complicated than running a Python executable.

First, install Rust by running the command provided by the official Rust website:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Normally, this will add $HOME/.cargo/bin in your path.

Then, download the vsvg source code:

git clone https://github.com/abey79/vsvg
cd vsvg

Running the sketch examples

See whiskers's README.md.

Installing vsvg-cli

See vsvg-cli's README.md.

Design notes

A few design considerations can be found here. They concern the use of this project as basis for a possible future Rust-based vpype-core package.

Licence

This project is available under the MIT licence.

Extension points exported contracts — how you extend this code

App (Interface)
This is the trait that your sketch app must explicitly implement. The [`App::update`] function is where the sketch draw [17 …
crates/whiskers/src/lib.rs
IntoBezPathTolerance (Interface)
Provided a tolerance, can be converted into a `BezPath`. [12 implementers]
crates/vsvg/src/path/into_bezpath.rs
Widget (Interface)
This is the base trait for widgets used to display sketch parameters in the UI. For each supported sketch parameter typ [10 …
crates/whiskers-widgets/src/lib.rs
ViewerApp (Interface)
Implement this trait to build a custom viewer app based on [`Viewer`]. [4 implementers]
crates/vsvg-viewer/src/lib.rs
CommandArg (Interface)
A trait for types that can be used as command line arguments. [1 implementers]
crates/vsvg-cli/src/cli.rs
DirtySetter (Interface)
Convenience trait to be used with [`egui::Response`] for setting the [`Runner`] dirty flag. [1 implementers]
crates/whiskers/src/runner/mod.rs
Transforms (Interface)
(no doc) [10 implementers]
crates/vsvg/src/traits/transforms.rs
WidgetMapper (Interface)
This utility trait serves to associate a [`Widget`] type with a given sketch parameter type `T`. Do not implement this [1 …
crates/whiskers-widgets/src/lib.rs

Core symbols most depended-on inside this repo

x
called by 30
crates/vsvg/src/path/point.rs
y
called by 30
crates/vsvg/src/path/point.rs
add
called by 26
crates/vsvg/src/angle.rs
width
called by 23
crates/whiskers/src/sketch.rs
crop_x
called by 23
crates/vsvg/src/crop.rs
as_ref
called by 22
crates/vsvg/src/path/point.rs
color
called by 21
crates/whiskers/src/sketch.rs
stroke_width
called by 16
crates/whiskers/src/sketch.rs

Shape

Method 535
Function 145
Class 114
Enum 19
Interface 19

Languages

Rust98%
Python2%

Modules by API surface

crates/vsvg/src/path/path.rs27 symbols
crates/vsvg/src/path/flattened_path.rs25 symbols
crates/whiskers/src/sketch.rs22 symbols
crates/vsvg/src/svg/reader.rs22 symbols
crates/vsvg/src/ui/list_item.rs21 symbols
crates/vsvg/src/path_index.rs21 symbols
crates/whiskers/src/runner/mod.rs19 symbols
crates/vsvg/src/length.rs19 symbols
crates/msvg/src/app.rs19 symbols
crates/vsvg/src/svg/inkscape_layer_preprocessor.rs17 symbols
crates/vsvg/src/angle.rs17 symbols
crates/vsvg-viewer/src/render_data.rs17 symbols

For agents

$ claude mcp add vsvg \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page