Skip to content

Commit

Permalink
Introduced cargo workspaces and renamed crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmackdev committed Aug 1, 2023
1 parent ed78939 commit b65b8e3
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 190 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

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

31 changes: 3 additions & 28 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,6 @@
[package]
name = "eframe_template"
version = "0.1.0"
authors = ["Emil Ernerfeldt <[email protected]>"]
edition = "2021"
rust-version = "1.65"


[dependencies]
egui = "0.22.0"
eframe = { version = "0.22.0", default-features = false, features = [
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
] }
log = "0.4"

# You only need serde if you want app persistence:
serde = { version = "1", features = ["derive"] }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.10"

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"
[workspace]

members = ["pubsubman_gui"]


[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::all
cargo test --workspace --all-targets --all-features
cargo test --workspace --doc
trunk build
cd pubsubman_gui && trunk build
140 changes: 0 additions & 140 deletions index.html

This file was deleted.

1 change: 1 addition & 0 deletions pubsubman_gui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
28 changes: 28 additions & 0 deletions pubsubman_gui/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[package]
name = "pubsubman_gui"
version = "0.1.0"
authors = ["Duncan MacKinnon <[email protected]>"]
edition = "2021"
rust-version = "1.65"


[dependencies]
egui = "0.22.0"
eframe = { version = "0.22.0", default-features = false, features = [
"accesskit", # Make egui comptaible with screen readers. NOTE: adds a lot of dependencies.
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
] }
log = "0.4"

# You only need serde if you want app persistence:
serde = { version = "1", features = ["derive"] }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.10"

# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"
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
14 changes: 7 additions & 7 deletions assets/sw.js → pubsubman_gui/assets/sw.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var cacheName = 'egui-template-pwa';
var cacheName = "egui-template-pwa";
var filesToCache = [
'./',
'./index.html',
'./eframe_template.js',
'./eframe_template_bg.wasm',
"./",
"./index.html",
"./pubsubman_gui.js",
"./pubsubman_gui_bg.wasm",
];

/* Start the service worker and cache all of the app's content */
self.addEventListener('install', function (e) {
self.addEventListener("install", function (e) {
e.waitUntil(
caches.open(cacheName).then(function (cache) {
return cache.addAll(filesToCache);
Expand All @@ -16,7 +16,7 @@ self.addEventListener('install', function (e) {
});

/* Serve cached content when offline */
self.addEventListener('fetch', function (e) {
self.addEventListener("fetch", function (e) {
e.respondWith(
caches.match(e.request).then(function (response) {
return response || fetch(e.request);
Expand Down
Loading

0 comments on commit b65b8e3

Please sign in to comment.