Skip to content

Commit

Permalink
Merge pull request #78 from perlindgren/hippomenes
Browse files Browse the repository at this point in the history
Merge with dev
  • Loading branch information
perlindgren authored Jun 10, 2024
2 parents b01e500 + 1d81c2f commit 7ea181d
Show file tree
Hide file tree
Showing 139 changed files with 14,910 additions and 3,578 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
push:
branches: ["master"]
branches: ["master", "egui_generic"]
pull_request:
branches: ["master"]

Expand Down Expand Up @@ -42,4 +42,4 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: rustfmt
run: cargo fmt --all -- --check
run: cargo fmt --all -- --check
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,38 @@
"Swatinem",
"Textbox",
"Tpdf",
"bgeu",
"bltu",
"blueviolet",
"clic",
"clicintattr",
"clicintctl",
"clicintie",
"clicintip",
"csrstore",
"darkgray",
"eframe",
"egui",
"epaint",
"graphviz",
"hoverable",
"imem",
"interactable",
"jalr",
"librust",
"lightcoral",
"lightgray",
"lightgreen",
"lsbzero",
"menubutton",
"mepc",
"mintthresh",
"mmio",
"mret",
"petgraph",
"println",
"regfile",
"regs",
"repr",
"rgbaf",
"rgbf",
Expand All @@ -39,6 +56,7 @@
"struct",
"stylesheet",
"syncrim",
"szext",
"toposort",
"trik",
"typetag",
Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ optional = true

[dependencies.egui]
optional = true
version = "0.22.0"
version = "0.23.0"

[dependencies.eframe]
optional = true
version = "0.22.0"
version = "0.23.0"

[dependencies.epaint]
optional = true
version = "0.22.0"
version = "0.23.0"

[features]
default = ["gui-vizia"]
default = ["gui-egui"]
components = []
gui-vizia = ["vizia", "components"]
gui-egui = ["egui", "eframe", "epaint", "components"]
Expand Down
3 changes: 3 additions & 0 deletions empty.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"store": []
}
6 changes: 4 additions & 2 deletions examples/add.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
Expand Down Expand Up @@ -40,8 +42,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
6 changes: 4 additions & 2 deletions examples/add_edit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
Expand Down Expand Up @@ -40,8 +42,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/add_mux.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand Down Expand Up @@ -107,8 +108,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/add_reg.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input, SignalFmt, SignalSize},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();

Expand Down Expand Up @@ -66,8 +67,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/add_reg_compound_wire.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand Down Expand Up @@ -48,8 +49,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/data_mem.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::{ops::Range, path::PathBuf};
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input, SignalUnsigned},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand Down Expand Up @@ -79,8 +80,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/mux_edit.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand Down Expand Up @@ -63,8 +64,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/probe_constant.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{common::ComponentStore, components::*, fern::fern_setup};

fn main() {
fern_setup();

Expand All @@ -15,8 +16,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/probe_edit.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand All @@ -18,8 +19,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/probe_stim.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{common::ComponentStore, components::*, fern::fern_setup};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand All @@ -11,8 +12,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
7 changes: 4 additions & 3 deletions examples/probe_stim_assert.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand All @@ -23,8 +24,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
9 changes: 5 additions & 4 deletions examples/sext.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use std::path::PathBuf;
#[cfg(feature = "gui-egui")]
use syncrim::gui_egui::editor::Library;
use syncrim::{
common::{ComponentStore, Input},
components::*,
fern::fern_setup,
};

fn main() {
fern_setup();
let cs = ComponentStore {
Expand All @@ -21,16 +22,16 @@ fn main() {
vec![(220.0, 100.0), (250.0, 100.0)],
Input::new("sxt0", "out"),
),
Probe::rc_new("p1", (260.0, 100.0), Input::new("sxt0", "out")),
Cross::rc_new("p1", (260.0, 100.0), Input::new("sxt0", "out")),
],
};

let path = PathBuf::from("sext.json");
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path, Library::default()).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
4 changes: 2 additions & 2 deletions mips/examples/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
4 changes: 2 additions & 2 deletions mips/examples/reg_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ fn main() {
cs.save_file(&path);

#[cfg(feature = "gui-egui")]
syncrim::gui_egui::gui(&cs, &path).ok();
syncrim::gui_egui::gui(cs, &path).ok();

#[cfg(feature = "gui-vizia")]
syncrim::gui_vizia::gui(&cs, &path);
syncrim::gui_vizia::gui(cs, &path);
}
Loading

0 comments on commit 7ea181d

Please sign in to comment.