[niepce] Issue #14 - Move the Rust main code to a separate directory
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] Issue #14 - Move the Rust main code to a separate directory
- Date: Sat, 15 Feb 2020 03:49:46 +0000 (UTC)
commit 3ae67e25c983667b92f071ec345b80c4fd627105
Author: Hubert Figuière <hub figuiere net>
Date: Fri Feb 14 21:50:30 2020 -0500
Issue #14 - Move the Rust main code to a separate directory
- Use cargo workspaces
Cargo.toml | 38 ++++------------------
niepce-main/Cargo.toml | 33 +++++++++++++++++++
build.rs => niepce-main/build.rs | 0
{examples => niepce-main/examples}/widget-test.rs | 0
{src => niepce-main/src}/lib.rs | 0
.../src}/libraryclient/clientimpl.rs | 0
.../src}/libraryclient/clientinterface.rs | 0
{src => niepce-main/src}/libraryclient/mod.rs | 0
{src => niepce-main/src}/niepce/mod.rs | 0
.../src}/niepce/ui/dialogs/confirm.rs | 0
{src => niepce-main/src}/niepce/ui/dialogs/mod.rs | 0
.../src}/niepce/ui/dialogs/requestnewfolder.rs | 0
.../src}/niepce/ui/image_grid_view.rs | 0
.../src}/niepce/ui/image_list_store.rs | 0
{src => niepce-main/src}/niepce/ui/imagetoolbar.rs | 0
.../src}/niepce/ui/library_cell_renderer.rs | 0
{src => niepce-main/src}/niepce/ui/mod.rs | 0
{src => niepce-main/src}/niepce/ui/thumb_nav.rs | 0
.../src}/niepce/ui/thumb_strip_view.rs | 0
src/Makefile.am | 35 ++++++++++----------
20 files changed, 57 insertions(+), 49 deletions(-)
---
diff --git a/Cargo.toml b/Cargo.toml
index f0ef49d..a659dee 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,33 +1,7 @@
-[package]
-name = "niepce_rust"
-version = "0.1.0"
-authors = ["Hubert Figuière <hub figuiere net>"]
-build = "build.rs"
+[workspace]
-[dependencies]
-once_cell = "^0"
-gettext-rs = "0.3.0"
-glib = { version = "^0.9.3" }
-gio-sys = "*"
-gio = "^0.8.1"
-cairo-rs = "*"
-gdk = "*"
-gdk-pixbuf = "*"
-gdk-pixbuf-sys = "*"
-gtk-sys = { version = "*", features = ["v3_22"] }
-gtk = { version = "^0.8.1" }
-libc = "0.2.39"
-#gphoto = "0.1.1"
-
-npc-fwk = { path = "crates/npc-fwk" }
-npc-engine = { path = "crates/npc-engine" }
-
-[build-dependencies]
-cbindgen = { version = "0.13.1" }
-
-[lib]
-name = "niepce_rust"
-crate-type = ["staticlib", "lib"]
-
-[[example]]
-name = "widget-test"
+members = [
+ "crates/npc-fwk",
+ "crates/npc-engine",
+ "niepce-main",
+]
diff --git a/niepce-main/Cargo.toml b/niepce-main/Cargo.toml
new file mode 100644
index 0000000..1d9735f
--- /dev/null
+++ b/niepce-main/Cargo.toml
@@ -0,0 +1,33 @@
+[package]
+name = "niepce_rust"
+version = "0.1.0"
+authors = ["Hubert Figuière <hub figuiere net>"]
+build = "build.rs"
+
+[dependencies]
+once_cell = "^0"
+gettext-rs = "0.3.0"
+glib = { version = "^0.9.3" }
+gio-sys = "*"
+gio = "^0.8.1"
+cairo-rs = "*"
+gdk = "*"
+gdk-pixbuf = "*"
+gdk-pixbuf-sys = "*"
+gtk-sys = { version = "*", features = ["v3_22"] }
+gtk = { version = "^0.8.1" }
+libc = "0.2.39"
+#gphoto = "0.1.1"
+
+npc-fwk = { path = "../crates/npc-fwk" }
+npc-engine = { path = "../crates/npc-engine" }
+
+[build-dependencies]
+cbindgen = { version = "0.13.1" }
+
+[lib]
+name = "niepce_rust"
+crate-type = ["staticlib", "lib"]
+
+[[example]]
+name = "widget-test"
diff --git a/build.rs b/niepce-main/build.rs
similarity index 100%
rename from build.rs
rename to niepce-main/build.rs
diff --git a/examples/widget-test.rs b/niepce-main/examples/widget-test.rs
similarity index 100%
rename from examples/widget-test.rs
rename to niepce-main/examples/widget-test.rs
diff --git a/src/lib.rs b/niepce-main/src/lib.rs
similarity index 100%
rename from src/lib.rs
rename to niepce-main/src/lib.rs
diff --git a/src/libraryclient/clientimpl.rs b/niepce-main/src/libraryclient/clientimpl.rs
similarity index 100%
rename from src/libraryclient/clientimpl.rs
rename to niepce-main/src/libraryclient/clientimpl.rs
diff --git a/src/libraryclient/clientinterface.rs b/niepce-main/src/libraryclient/clientinterface.rs
similarity index 100%
rename from src/libraryclient/clientinterface.rs
rename to niepce-main/src/libraryclient/clientinterface.rs
diff --git a/src/libraryclient/mod.rs b/niepce-main/src/libraryclient/mod.rs
similarity index 100%
rename from src/libraryclient/mod.rs
rename to niepce-main/src/libraryclient/mod.rs
diff --git a/src/niepce/mod.rs b/niepce-main/src/niepce/mod.rs
similarity index 100%
rename from src/niepce/mod.rs
rename to niepce-main/src/niepce/mod.rs
diff --git a/src/niepce/ui/dialogs/confirm.rs b/niepce-main/src/niepce/ui/dialogs/confirm.rs
similarity index 100%
rename from src/niepce/ui/dialogs/confirm.rs
rename to niepce-main/src/niepce/ui/dialogs/confirm.rs
diff --git a/src/niepce/ui/dialogs/mod.rs b/niepce-main/src/niepce/ui/dialogs/mod.rs
similarity index 100%
rename from src/niepce/ui/dialogs/mod.rs
rename to niepce-main/src/niepce/ui/dialogs/mod.rs
diff --git a/src/niepce/ui/dialogs/requestnewfolder.rs b/niepce-main/src/niepce/ui/dialogs/requestnewfolder.rs
similarity index 100%
rename from src/niepce/ui/dialogs/requestnewfolder.rs
rename to niepce-main/src/niepce/ui/dialogs/requestnewfolder.rs
diff --git a/src/niepce/ui/image_grid_view.rs b/niepce-main/src/niepce/ui/image_grid_view.rs
similarity index 100%
rename from src/niepce/ui/image_grid_view.rs
rename to niepce-main/src/niepce/ui/image_grid_view.rs
diff --git a/src/niepce/ui/image_list_store.rs b/niepce-main/src/niepce/ui/image_list_store.rs
similarity index 100%
rename from src/niepce/ui/image_list_store.rs
rename to niepce-main/src/niepce/ui/image_list_store.rs
diff --git a/src/niepce/ui/imagetoolbar.rs b/niepce-main/src/niepce/ui/imagetoolbar.rs
similarity index 100%
rename from src/niepce/ui/imagetoolbar.rs
rename to niepce-main/src/niepce/ui/imagetoolbar.rs
diff --git a/src/niepce/ui/library_cell_renderer.rs b/niepce-main/src/niepce/ui/library_cell_renderer.rs
similarity index 100%
rename from src/niepce/ui/library_cell_renderer.rs
rename to niepce-main/src/niepce/ui/library_cell_renderer.rs
diff --git a/src/niepce/ui/mod.rs b/niepce-main/src/niepce/ui/mod.rs
similarity index 100%
rename from src/niepce/ui/mod.rs
rename to niepce-main/src/niepce/ui/mod.rs
diff --git a/src/niepce/ui/thumb_nav.rs b/niepce-main/src/niepce/ui/thumb_nav.rs
similarity index 100%
rename from src/niepce/ui/thumb_nav.rs
rename to niepce-main/src/niepce/ui/thumb_nav.rs
diff --git a/src/niepce/ui/thumb_strip_view.rs b/niepce-main/src/niepce/ui/thumb_strip_view.rs
similarity index 100%
rename from src/niepce/ui/thumb_strip_view.rs
rename to niepce-main/src/niepce/ui/thumb_strip_view.rs
diff --git a/src/Makefile.am b/src/Makefile.am
index 8a99b80..06b0ee1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,6 @@ SUBDIRS = . ext fwk \
engine libraryclient ncr niepce
RUST_SOURCES = \
- @top_srcdir@/build.rs \
@top_srcdir@/Cargo.toml \
@top_srcdir@/Cargo.lock \
@top_srcdir@/crates/npc-engine/Cargo.toml \
@@ -47,22 +46,24 @@ RUST_SOURCES = \
@top_srcdir@/crates/npc-fwk/src/utils/exiv2.rs \
@top_srcdir@/crates/npc-fwk/src/utils/files.rs \
@top_srcdir@/crates/npc-fwk/src/utils/mod.rs \
- @top_srcdir@/examples/widget-test.rs \
- @top_srcdir@/src/lib.rs \
- @top_srcdir@/src/libraryclient/clientimpl.rs \
- @top_srcdir@/src/libraryclient/clientinterface.rs \
- @top_srcdir@/src/libraryclient/mod.rs \
- @top_srcdir@/src/niepce/mod.rs \
- @top_srcdir@/src/niepce/ui/mod.rs \
- @top_srcdir@/src/niepce/ui/imagetoolbar.rs \
- @top_srcdir@/src/niepce/ui/image_grid_view.rs \
- @top_srcdir@/src/niepce/ui/image_list_store.rs \
- @top_srcdir@/src/niepce/ui/dialogs/mod.rs \
- @top_srcdir@/src/niepce/ui/dialogs/confirm.rs \
- @top_srcdir@/src/niepce/ui/dialogs/requestnewfolder.rs \
- @top_srcdir@/src/niepce/ui/thumb_nav.rs \
- @top_srcdir@/src/niepce/ui/library_cell_renderer.rs \
- @top_srcdir@/src/niepce/ui/thumb_strip_view.rs \
+ @top_srcdir@/niepce-main/build.rs \
+ @top_srcdir@/niepce-main/Cargo.toml \
+ @top_srcdir@/niepce-main/examples/widget-test.rs \
+ @top_srcdir@/niepce-main/src/lib.rs \
+ @top_srcdir@/niepce-main/src/libraryclient/clientimpl.rs \
+ @top_srcdir@/niepce-main/src/libraryclient/clientinterface.rs \
+ @top_srcdir@/niepce-main/src/libraryclient/mod.rs \
+ @top_srcdir@/niepce-main/src/niepce/mod.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/mod.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/imagetoolbar.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/image_grid_view.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/image_list_store.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/dialogs/mod.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/dialogs/confirm.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/dialogs/requestnewfolder.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/thumb_nav.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/library_cell_renderer.rs \
+ @top_srcdir@/niepce-main/src/niepce/ui/thumb_strip_view.rs \
$(NULL)
EXTRA_DIST = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]