Trying not to be negative with any cool project, this feels like the wrong layer in which to build SVG functionality.
I mean, if the path can already be generated, an intermediary executable can easily pipe that in and turn into an SVG file. That can be implemented in python, node, rust, whatever and can be given any number of styling options.