diff --git a/.cargo/config.toml b/.cargo/config.toml index dd033b868..2374773ff 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,6 @@ [build] target-dir = 'dist/target' + +# Windows has stack overflows when calling from Tauri, so we increase compiler size +[target.'cfg(windows)'] +rustflags = ["-C", "link-args=/STACK:16777220"] diff --git a/Cargo.toml b/Cargo.toml index e2f74f86f..827a2f5f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,5 +7,21 @@ members = [ './apps/theseus_playground', ] +[profile.dev] +opt-level = 0 +debug = true +debug-assertions = true +overflow-checks = true +lto = false +panic = 'unwind' +incremental = true +codegen-units = 256 +rpath = false + +# Optimize for speed and reduce size on release builds [profile.release] -lto = true +panic = "abort" # Strip expensive panic clean-up logic +codegen-units = 1 # Compile crates one after another so the compiler can optimize better +lto = true # Enables link to optimizations +opt-level = "s" # Optimize for binary size +strip = true # Remove debug symbols diff --git a/apps/theseus-gui/.eslintrc.json b/apps/theseus-gui-tpl/.eslintrc.json similarity index 100% rename from apps/theseus-gui/.eslintrc.json rename to apps/theseus-gui-tpl/.eslintrc.json diff --git a/apps/theseus-gui/index.html b/apps/theseus-gui-tpl/index.html similarity index 100% rename from apps/theseus-gui/index.html rename to apps/theseus-gui-tpl/index.html diff --git a/apps/theseus-gui/project.json b/apps/theseus-gui-tpl/project.json similarity index 100% rename from apps/theseus-gui/project.json rename to apps/theseus-gui-tpl/project.json diff --git a/apps/theseus-gui/src/app/App.spec.ts b/apps/theseus-gui-tpl/src/app/App.spec.ts similarity index 100% rename from apps/theseus-gui/src/app/App.spec.ts rename to apps/theseus-gui-tpl/src/app/App.spec.ts diff --git a/apps/theseus-gui/src/app/App.vue b/apps/theseus-gui-tpl/src/app/App.vue similarity index 100% rename from apps/theseus-gui/src/app/App.vue rename to apps/theseus-gui-tpl/src/app/App.vue diff --git a/apps/theseus-gui/src/app/NxWelcome.vue b/apps/theseus-gui-tpl/src/app/NxWelcome.vue similarity index 100% rename from apps/theseus-gui/src/app/NxWelcome.vue rename to apps/theseus-gui-tpl/src/app/NxWelcome.vue diff --git a/apps/theseus-gui/src/main.ts b/apps/theseus-gui-tpl/src/main.ts similarity index 100% rename from apps/theseus-gui/src/main.ts rename to apps/theseus-gui-tpl/src/main.ts diff --git a/apps/theseus-gui/src/router/index.ts b/apps/theseus-gui-tpl/src/router/index.ts similarity index 100% rename from apps/theseus-gui/src/router/index.ts rename to apps/theseus-gui-tpl/src/router/index.ts diff --git a/apps/theseus-gui/src/styles.scss b/apps/theseus-gui-tpl/src/styles.scss similarity index 100% rename from apps/theseus-gui/src/styles.scss rename to apps/theseus-gui-tpl/src/styles.scss diff --git a/apps/theseus-gui/src/views/AboutView.vue b/apps/theseus-gui-tpl/src/views/AboutView.vue similarity index 100% rename from apps/theseus-gui/src/views/AboutView.vue rename to apps/theseus-gui-tpl/src/views/AboutView.vue diff --git a/apps/theseus-gui/src/views/HomeView.vue b/apps/theseus-gui-tpl/src/views/HomeView.vue similarity index 100% rename from apps/theseus-gui/src/views/HomeView.vue rename to apps/theseus-gui-tpl/src/views/HomeView.vue diff --git a/apps/theseus-gui/tsconfig.app.json b/apps/theseus-gui-tpl/tsconfig.app.json similarity index 100% rename from apps/theseus-gui/tsconfig.app.json rename to apps/theseus-gui-tpl/tsconfig.app.json diff --git a/apps/theseus-gui/tsconfig.json b/apps/theseus-gui-tpl/tsconfig.json similarity index 100% rename from apps/theseus-gui/tsconfig.json rename to apps/theseus-gui-tpl/tsconfig.json diff --git a/apps/theseus-gui/vite.config.ts b/apps/theseus-gui-tpl/vite.config.ts similarity index 100% rename from apps/theseus-gui/vite.config.ts rename to apps/theseus-gui-tpl/vite.config.ts diff --git a/apps/theseus_playground/Cargo.toml b/apps/theseus_playground-tpl/Cargo.toml similarity index 100% rename from apps/theseus_playground/Cargo.toml rename to apps/theseus_playground-tpl/Cargo.toml diff --git a/apps/theseus_playground/project.json b/apps/theseus_playground-tpl/project.json similarity index 100% rename from apps/theseus_playground/project.json rename to apps/theseus_playground-tpl/project.json diff --git a/apps/theseus_playground/src/main.rs b/apps/theseus_playground-tpl/src/main.rs similarity index 100% rename from apps/theseus_playground/src/main.rs rename to apps/theseus_playground-tpl/src/main.rs diff --git a/libs/theseus/Cargo.toml b/libs/theseus-tpl/Cargo.toml similarity index 100% rename from libs/theseus/Cargo.toml rename to libs/theseus-tpl/Cargo.toml diff --git a/libs/theseus/project.json b/libs/theseus-tpl/project.json similarity index 100% rename from libs/theseus/project.json rename to libs/theseus-tpl/project.json diff --git a/libs/theseus/src/lib.rs b/libs/theseus-tpl/src/lib.rs similarity index 100% rename from libs/theseus/src/lib.rs rename to libs/theseus-tpl/src/lib.rs diff --git a/libs/theseus_macros/Cargo.toml b/libs/theseus_macros-tpl/Cargo.toml similarity index 100% rename from libs/theseus_macros/Cargo.toml rename to libs/theseus_macros-tpl/Cargo.toml diff --git a/libs/theseus_macros/project.json b/libs/theseus_macros-tpl/project.json similarity index 100% rename from libs/theseus_macros/project.json rename to libs/theseus_macros-tpl/project.json diff --git a/libs/theseus_macros/src/lib.rs b/libs/theseus_macros-tpl/src/lib.rs similarity index 100% rename from libs/theseus_macros/src/lib.rs rename to libs/theseus_macros-tpl/src/lib.rs diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 000000000..0c2ca5c32 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +edition = "2018" +max_width = 80