Skip to content

Commit

Permalink
Renamed packages
Browse files Browse the repository at this point in the history
vsvg-core -> vsvg
vsvg -> vsvg-cli
  • Loading branch information
abey79 committed Sep 16, 2023
1 parent 6565afd commit 89de92d
Show file tree
Hide file tree
Showing 49 changed files with 95 additions and 89 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
vsvg = "run --package vsvg-cli --bin vsvg --"
36 changes: 18 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

members = [
"vsvg",
"vsvg-core",
"vsvg-cli",
"vsvg-viewer",
"vsvg-multi",
]
Expand Down
38 changes: 38 additions & 0 deletions vsvg-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[package]
name = "vsvg-cli"
description = "An experimental SVG viewer for plotter users."
authors = ["Antoine Beyeler"]
version = "0.1.0-alpha.0"
edition = "2021"
readme = "../README.md"
homepage = "https://github.com/abey79/vsvg"
license = "MIT"

[[bin]]
name = "vsvg"
path = "src/main.rs"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui.workspace = true
eframe.workspace = true
serde.workspace = true
kurbo.workspace = true
rand.workspace = true
rand_chacha.workspace = true
tracing-subscriber = "0.3.16"
clap = { version = "4.1.6", features = ["cargo"]}
vsvg = { path = "../vsvg", features = ["egui"] }
vsvg-viewer = { path = "../vsvg-viewer"}
dhat = { version = "0.3.2", optional = true } # for heap profiling



# for dhat-heap!!
#[profile.release]
#debug = 1

[features]
dhat-heap = ["dhat"] # if you are doing heap profiling
dhat-ad-hoc = [] # if you are doing ad hoc profiling
2 changes: 1 addition & 1 deletion vsvg/src/cli.rs → vsvg-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::error::Error;
use std::fmt::{Debug, Display, Formatter};

use std::path::PathBuf;
use vsvg_core::{Document, DrawState, LayerID};
use vsvg::{Document, DrawState, LayerID};

/// A trait for types that can be used as command line arguments.
trait CommandArg: Clone + Into<CommandValue> + Send + Sync + Debug + 'static {}
Expand Down
4 changes: 2 additions & 2 deletions vsvg/src/commands.rs → vsvg-cli/src/commands.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::cli::{CommandDesc, CommandValue};
use clap::{arg, value_parser, Arg, Id};
use std::collections::HashMap;
use vsvg_core::{DocumentTrait, IndexBuilder, Transforms};
use vsvg::{DocumentTrait, IndexBuilder, Transforms};

// https://stackoverflow.com/a/38361018/229511
macro_rules! count_items {
Expand Down Expand Up @@ -78,7 +78,7 @@ macro_rules! command_decl {
command_impl!($arg, String, String, $(|$state, $($x),+| $action),+)
};
($arg:expr, LayerID, $(|$state:ident, $($x:ident),+| $action:expr),+) => {
command_impl!($arg, vsvg_core::LayerID, LayerID, $(|$state, $($x),+| $action),+)
command_impl!($arg, vsvg::LayerID, LayerID, $(|$state, $($x),+| $action),+)
};
}

Expand Down
2 changes: 1 addition & 1 deletion vsvg/src/main.rs → vsvg-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::io::Read;
use std::path::PathBuf;

use crate::cli::State;
use vsvg_core::Document;
use vsvg::Document;

#[cfg(feature = "dhat-heap")]
#[global_allocator]
Expand Down
38 changes: 0 additions & 38 deletions vsvg-core/Cargo.toml

This file was deleted.

2 changes: 1 addition & 1 deletion vsvg-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"


[dependencies]
vsvg-core = { path = "../vsvg-core" }
vsvg = { path = "../vsvg" }
kurbo.workspace = true
egui.workspace = true
eframe.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion vsvg-viewer/src/document_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::engine::{DisplayMode, DocumentData, Engine, ViewerOptions};
use eframe::egui_wgpu;
use egui::{Pos2, Rect, Sense, Ui};
use std::sync::{Arc, Mutex};
use vsvg_core::{DocumentTrait, LayerTrait};
use vsvg::{DocumentTrait, LayerTrait};

/// Widget to display a [`vsvg_core::Document`] in a egui application.
///
Expand Down
2 changes: 1 addition & 1 deletion vsvg-viewer/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use eframe::egui_wgpu::RenderState;
use std::collections::HashMap;
use std::sync::{Arc, Mutex};

use vsvg_core::{
use vsvg::{
Color, Document, DocumentTrait, FlattenedDocument, LayerID, LayerTrait, PathTrait, Point,
};
use wgpu::util::DeviceExt;
Expand Down
2 changes: 1 addition & 1 deletion vsvg-viewer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::engine::DocumentData;
use crate::viewer::Viewer;
use std::error::Error;
use std::sync::Arc;
use vsvg_core::Document;
use vsvg::Document;

/// Show a document in a window.
#[allow(clippy::missing_panics_doc)]
Expand Down
2 changes: 1 addition & 1 deletion vsvg-viewer/src/painters.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::engine::Engine;
use std::mem;
use vsvg_core::{FlattenedPath, PathTrait, Point};
use vsvg::{FlattenedPath, PathTrait, Point};
use wgpu::util::DeviceExt;
use wgpu::{
include_wgsl, vertex_attr_array, Buffer, ColorTargetState, Device, PrimitiveTopology,
Expand Down
48 changes: 26 additions & 22 deletions vsvg/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
[package]
name = "vsvg"
description = "An experimental SVG viewer for plotter users."
description = "Rust prototype of vpype-core V2"
authors = ["Antoine Beyeler"]
version = "0.1.0-alpha.0"
edition = "2021"
readme = "../README.md"
homepage = "https://github.com/abey79/vsvg"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui.workspace = true
eframe.workspace = true
serde.workspace = true
kurbo.workspace = true
rand.workspace = true
rand_chacha.workspace = true
tracing-subscriber = "0.3.16"
clap = { version = "4.1.6", features = ["cargo"]}
vsvg-core = { path = "../vsvg-core", features = ["egui"] }
vsvg-viewer = { path = "../vsvg-viewer"}
dhat = { version = "0.3.2", optional = true } # for heap profiling

usvg = "0.29.0"
rosvgtree = "0.1.0"
rctree = "*" # Let usvg decide on the version
svg = "0.13.1"
rayon = "1.6.1"
arrayvec = "0.7.2"
lyon_geom = "1.0.4"
regex = "1.7.1"
lazy_static = "1.4.0"
indexmap = {version = "1.9.2", features = ["rayon"]}
kdtree = "0.7.0"
bitvec = "1.0.1"
time = {version="0.3.20", features = ["formatting"]}

# optional dependencies, mainly for Point interop.
egui = { workspace=true, optional = true }
glam = { version="0", optional = true }
bevy = { version="0", optional = true, default-features = false }

# for dhat-heap!!
#[profile.release]
#debug = 1
[dev-dependencies]
approx = "0.5.1"
criterion = "0.4.0"
rand.workspace = true
rand_chacha.workspace = true

[features]
dhat-heap = ["dhat"] # if you are doing heap profiling
dhat-ad-hoc = [] # if you are doing ad hoc profiling
[[bench]]
name = "bench_path_index"
harness = false
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion vsvg-core/src/lib.rs → vsvg/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! `vsvg-core` is a library crate to manipulate vector graphics, with a focus on SVG and
//! `vsvg` is a library crate to manipulate vector graphics, with a focus on SVG and
//! pen-plotter applications. It's inspired upon [`vpype`](https://github.com/abey79/vpype), the
//! Swiss-Army-knife command-line tool for plotter vector graphics.
//!
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 89de92d

Please sign in to comment.