From 5515c8e65c8404bb49320ddff337dc25cf56cd7b Mon Sep 17 00:00:00 2001 From: James Connolly Date: Sun, 12 May 2024 21:22:14 -0400 Subject: [PATCH 1/4] changing wellen to a cargo workspace --- Cargo.toml | 26 +++++------ crates/wellen/Cargo.toml | 43 +++++++++++++++++++ {benches => crates/wellen/benches}/wavemem.rs | 0 {src => crates/wellen/src}/fst.rs | 0 {src => crates/wellen/src}/ghw/common.rs | 0 {src => crates/wellen/src}/ghw/hierarchy.rs | 0 {src => crates/wellen/src}/ghw/mod.rs | 0 {src => crates/wellen/src}/ghw/signals.rs | 0 {src => crates/wellen/src}/hierarchy.rs | 0 {src => crates/wellen/src}/lib.rs | 0 {src => crates/wellen/src}/signals.rs | 0 {src => crates/wellen/src}/simple.rs | 0 {src => crates/wellen/src}/vcd.rs | 0 {src => crates/wellen/src}/viewers.rs | 0 {src => crates/wellen/src}/wavemem.rs | 0 15 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 crates/wellen/Cargo.toml rename {benches => crates/wellen/benches}/wavemem.rs (100%) rename {src => crates/wellen/src}/fst.rs (100%) rename {src => crates/wellen/src}/ghw/common.rs (100%) rename {src => crates/wellen/src}/ghw/hierarchy.rs (100%) rename {src => crates/wellen/src}/ghw/mod.rs (100%) rename {src => crates/wellen/src}/ghw/signals.rs (100%) rename {src => crates/wellen/src}/hierarchy.rs (100%) rename {src => crates/wellen/src}/lib.rs (100%) rename {src => crates/wellen/src}/signals.rs (100%) rename {src => crates/wellen/src}/simple.rs (100%) rename {src => crates/wellen/src}/vcd.rs (100%) rename {src => crates/wellen/src}/viewers.rs (100%) rename {src => crates/wellen/src}/wavemem.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 2787950..0129ccc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,22 +2,25 @@ # released under BSD 3-Clause License # author: Kevin Laeufer -[package] -name = "wellen" +[workspace] +resolver = "2" +members = ["crates/*"] + +[workspace.package] version = "0.9.10" edition = "2021" # we require the `div_ceil` method on integers -rust-version="1.73.0" +rust-version = "1.73.0" authors = ["Kevin Laeufer "] description = "Fast VCD and FST library for waveform viewers written in Rust." repository = "https://github.com/ekiwi/wellen" license = "BSD-3-Clause" +default-members = ["crates/wellen"] include = ["Cargo.toml", "LICENSE", "src/", "benches/"] keywords = ["vcd", "fst", "waveform", "wavedump"] -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] +[workspace.dependencies] bytesize = "1.3.0" fst-native = "0.8.1" leb128 = "0.2.5" @@ -26,9 +29,9 @@ memmap2 = "0.9.0" rayon = "1.8.0" num_enum = "0.7.1" thiserror = "1.0.56" -serde = { version = "1.0.197", features = ["derive"], optional = true } +serde = { version = "1.0.197", features = ["derive"] } -[dev-dependencies] +# dev dependencies itertools = "0.12.1" vcd = "0.7.0" clap = { version = "4.4.6", features = ["derive"] } @@ -38,12 +41,3 @@ proptest = "1.4.0" [profile.release] debug = true - -[[bench]] -name = "wavemem" -harness = false - -[features] -# makes internal functions public for benchmarking -benchmark = [] -serde1 = ["dep:serde"] diff --git a/crates/wellen/Cargo.toml b/crates/wellen/Cargo.toml new file mode 100644 index 0000000..f8644b2 --- /dev/null +++ b/crates/wellen/Cargo.toml @@ -0,0 +1,43 @@ +[package] +name = "wellen" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +authors.workspace = true +description.workspace = true +repository.workspace = true +license.workspace = true +default-members.workspace = true +include.workspace = true +keywords.workspace = true + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +bytesize = { workspace = true } +fst-native = { workspace = true } +leb128 = { workspace = true } +lz4_flex = { workspace = true } +memmap2 = { workspace = true } +rayon = { workspace = true } +num_enum = { workspace = true } +thiserror = { workspace = true } +serde = { workspace = true, optional = true } + +[dev-dependencies] +itertools = { workspace = true } +vcd = { workspace = true } +clap = { workspace = true } +criterion = { workspace = true } +indicatif = { workspace = true } +proptest = { workspace = true } + + +[[bench]] +name = "wavemem" +harness = false + +[features] +# makes internal functions public for benchmarking +benchmark = [] +serde1 = ["dep:serde"] diff --git a/benches/wavemem.rs b/crates/wellen/benches/wavemem.rs similarity index 100% rename from benches/wavemem.rs rename to crates/wellen/benches/wavemem.rs diff --git a/src/fst.rs b/crates/wellen/src/fst.rs similarity index 100% rename from src/fst.rs rename to crates/wellen/src/fst.rs diff --git a/src/ghw/common.rs b/crates/wellen/src/ghw/common.rs similarity index 100% rename from src/ghw/common.rs rename to crates/wellen/src/ghw/common.rs diff --git a/src/ghw/hierarchy.rs b/crates/wellen/src/ghw/hierarchy.rs similarity index 100% rename from src/ghw/hierarchy.rs rename to crates/wellen/src/ghw/hierarchy.rs diff --git a/src/ghw/mod.rs b/crates/wellen/src/ghw/mod.rs similarity index 100% rename from src/ghw/mod.rs rename to crates/wellen/src/ghw/mod.rs diff --git a/src/ghw/signals.rs b/crates/wellen/src/ghw/signals.rs similarity index 100% rename from src/ghw/signals.rs rename to crates/wellen/src/ghw/signals.rs diff --git a/src/hierarchy.rs b/crates/wellen/src/hierarchy.rs similarity index 100% rename from src/hierarchy.rs rename to crates/wellen/src/hierarchy.rs diff --git a/src/lib.rs b/crates/wellen/src/lib.rs similarity index 100% rename from src/lib.rs rename to crates/wellen/src/lib.rs diff --git a/src/signals.rs b/crates/wellen/src/signals.rs similarity index 100% rename from src/signals.rs rename to crates/wellen/src/signals.rs diff --git a/src/simple.rs b/crates/wellen/src/simple.rs similarity index 100% rename from src/simple.rs rename to crates/wellen/src/simple.rs diff --git a/src/vcd.rs b/crates/wellen/src/vcd.rs similarity index 100% rename from src/vcd.rs rename to crates/wellen/src/vcd.rs diff --git a/src/viewers.rs b/crates/wellen/src/viewers.rs similarity index 100% rename from src/viewers.rs rename to crates/wellen/src/viewers.rs diff --git a/src/wavemem.rs b/crates/wellen/src/wavemem.rs similarity index 100% rename from src/wavemem.rs rename to crates/wellen/src/wavemem.rs From 049b722e6d4693c267f2e9335ea81fc56e086578 Mon Sep 17 00:00:00 2001 From: James Connolly Date: Sun, 19 May 2024 20:38:53 -0400 Subject: [PATCH 2/4] move wellen up a directory --- Cargo.toml | 4 ++-- {crates/wellen => wellen}/Cargo.toml | 0 {crates/wellen => wellen}/benches/wavemem.rs | 0 {crates/wellen => wellen}/src/fst.rs | 0 {crates/wellen => wellen}/src/ghw/common.rs | 0 {crates/wellen => wellen}/src/ghw/hierarchy.rs | 0 {crates/wellen => wellen}/src/ghw/mod.rs | 0 {crates/wellen => wellen}/src/ghw/signals.rs | 0 {crates/wellen => wellen}/src/hierarchy.rs | 0 {crates/wellen => wellen}/src/lib.rs | 0 {crates/wellen => wellen}/src/signals.rs | 0 {crates/wellen => wellen}/src/simple.rs | 0 {crates/wellen => wellen}/src/vcd.rs | 0 {crates/wellen => wellen}/src/viewers.rs | 0 {crates/wellen => wellen}/src/wavemem.rs | 0 15 files changed, 2 insertions(+), 2 deletions(-) rename {crates/wellen => wellen}/Cargo.toml (100%) rename {crates/wellen => wellen}/benches/wavemem.rs (100%) rename {crates/wellen => wellen}/src/fst.rs (100%) rename {crates/wellen => wellen}/src/ghw/common.rs (100%) rename {crates/wellen => wellen}/src/ghw/hierarchy.rs (100%) rename {crates/wellen => wellen}/src/ghw/mod.rs (100%) rename {crates/wellen => wellen}/src/ghw/signals.rs (100%) rename {crates/wellen => wellen}/src/hierarchy.rs (100%) rename {crates/wellen => wellen}/src/lib.rs (100%) rename {crates/wellen => wellen}/src/signals.rs (100%) rename {crates/wellen => wellen}/src/simple.rs (100%) rename {crates/wellen => wellen}/src/vcd.rs (100%) rename {crates/wellen => wellen}/src/viewers.rs (100%) rename {crates/wellen => wellen}/src/wavemem.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0129ccc..e52bfe6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ [workspace] resolver = "2" -members = ["crates/*"] +members = ["wellen"] [workspace.package] version = "0.9.10" @@ -15,7 +15,7 @@ authors = ["Kevin Laeufer "] description = "Fast VCD and FST library for waveform viewers written in Rust." repository = "https://github.com/ekiwi/wellen" license = "BSD-3-Clause" -default-members = ["crates/wellen"] +default-members = ["wellen"] include = ["Cargo.toml", "LICENSE", "src/", "benches/"] keywords = ["vcd", "fst", "waveform", "wavedump"] diff --git a/crates/wellen/Cargo.toml b/wellen/Cargo.toml similarity index 100% rename from crates/wellen/Cargo.toml rename to wellen/Cargo.toml diff --git a/crates/wellen/benches/wavemem.rs b/wellen/benches/wavemem.rs similarity index 100% rename from crates/wellen/benches/wavemem.rs rename to wellen/benches/wavemem.rs diff --git a/crates/wellen/src/fst.rs b/wellen/src/fst.rs similarity index 100% rename from crates/wellen/src/fst.rs rename to wellen/src/fst.rs diff --git a/crates/wellen/src/ghw/common.rs b/wellen/src/ghw/common.rs similarity index 100% rename from crates/wellen/src/ghw/common.rs rename to wellen/src/ghw/common.rs diff --git a/crates/wellen/src/ghw/hierarchy.rs b/wellen/src/ghw/hierarchy.rs similarity index 100% rename from crates/wellen/src/ghw/hierarchy.rs rename to wellen/src/ghw/hierarchy.rs diff --git a/crates/wellen/src/ghw/mod.rs b/wellen/src/ghw/mod.rs similarity index 100% rename from crates/wellen/src/ghw/mod.rs rename to wellen/src/ghw/mod.rs diff --git a/crates/wellen/src/ghw/signals.rs b/wellen/src/ghw/signals.rs similarity index 100% rename from crates/wellen/src/ghw/signals.rs rename to wellen/src/ghw/signals.rs diff --git a/crates/wellen/src/hierarchy.rs b/wellen/src/hierarchy.rs similarity index 100% rename from crates/wellen/src/hierarchy.rs rename to wellen/src/hierarchy.rs diff --git a/crates/wellen/src/lib.rs b/wellen/src/lib.rs similarity index 100% rename from crates/wellen/src/lib.rs rename to wellen/src/lib.rs diff --git a/crates/wellen/src/signals.rs b/wellen/src/signals.rs similarity index 100% rename from crates/wellen/src/signals.rs rename to wellen/src/signals.rs diff --git a/crates/wellen/src/simple.rs b/wellen/src/simple.rs similarity index 100% rename from crates/wellen/src/simple.rs rename to wellen/src/simple.rs diff --git a/crates/wellen/src/vcd.rs b/wellen/src/vcd.rs similarity index 100% rename from crates/wellen/src/vcd.rs rename to wellen/src/vcd.rs diff --git a/crates/wellen/src/viewers.rs b/wellen/src/viewers.rs similarity index 100% rename from crates/wellen/src/viewers.rs rename to wellen/src/viewers.rs diff --git a/crates/wellen/src/wavemem.rs b/wellen/src/wavemem.rs similarity index 100% rename from crates/wellen/src/wavemem.rs rename to wellen/src/wavemem.rs From 3d2001ed3a879706e17fbb1209e4436360b2ac67 Mon Sep 17 00:00:00 2001 From: James Connolly Date: Mon, 20 May 2024 16:03:29 -0400 Subject: [PATCH 3/4] remove warnings, propegate version because of msrv feature that hasn't landed, move examples --- .github/workflows/test.yml | 17 +++++++++-------- Cargo.toml | 4 +++- wellen/Cargo.toml | 3 +-- {examples => wellen/examples}/load_signals.rs | 0 wellen/inputs | 1 + 5 files changed, 14 insertions(+), 11 deletions(-) rename {examples => wellen/examples}/load_signals.rs (100%) create mode 120000 wellen/inputs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d045d99..0fcfa08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,13 +19,13 @@ jobs: - nightly steps: - - name: Update Rust to ${{ matrix.toolchain }} - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - name: Update Rust to ${{ matrix.toolchain }} + run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose semver: name: Check Semantic Versioning @@ -44,9 +44,9 @@ jobs: with: tool: cargo-msrv - name: Check MSRV + working-directory: wellen run: cargo msrv verify - examples: name: Try Examples runs-on: ubuntu-latest @@ -64,6 +64,7 @@ jobs: - name: Build run: cargo build --verbose --examples --release - name: load_signals + working-directory: wellen run: cargo run --release --example load_signals -- inputs/xilinx_isim/test1.vcd serialization: diff --git a/Cargo.toml b/Cargo.toml index e52bfe6..06ce0a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ [workspace] resolver = "2" members = ["wellen"] +default-members = ["wellen"] [workspace.package] version = "0.9.10" @@ -15,7 +16,8 @@ authors = ["Kevin Laeufer "] description = "Fast VCD and FST library for waveform viewers written in Rust." repository = "https://github.com/ekiwi/wellen" license = "BSD-3-Clause" -default-members = ["wellen"] + + include = ["Cargo.toml", "LICENSE", "src/", "benches/"] keywords = ["vcd", "fst", "waveform", "wavedump"] diff --git a/wellen/Cargo.toml b/wellen/Cargo.toml index f8644b2..332be17 100644 --- a/wellen/Cargo.toml +++ b/wellen/Cargo.toml @@ -2,12 +2,11 @@ name = "wellen" version.workspace = true edition.workspace = true -rust-version.workspace = true +rust-version = "1.73.0" authors.workspace = true description.workspace = true repository.workspace = true license.workspace = true -default-members.workspace = true include.workspace = true keywords.workspace = true diff --git a/examples/load_signals.rs b/wellen/examples/load_signals.rs similarity index 100% rename from examples/load_signals.rs rename to wellen/examples/load_signals.rs diff --git a/wellen/inputs b/wellen/inputs new file mode 120000 index 0000000..a80bb2b --- /dev/null +++ b/wellen/inputs @@ -0,0 +1 @@ +../inputs \ No newline at end of file From 50390d78828e04fecf8e4998d612498e66bf5fbd Mon Sep 17 00:00:00 2001 From: James Connolly Date: Mon, 20 May 2024 23:06:44 -0400 Subject: [PATCH 4/4] removed symlink --- .github/workflows/test.yml | 2 +- wellen/inputs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 120000 wellen/inputs diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0fcfa08..1ddc97b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,7 @@ jobs: run: cargo build --verbose --examples --release - name: load_signals working-directory: wellen - run: cargo run --release --example load_signals -- inputs/xilinx_isim/test1.vcd + run: cargo run --release --example load_signals -- ../inputs/xilinx_isim/test1.vcd serialization: name: Test Serialization Feature ("serde1") diff --git a/wellen/inputs b/wellen/inputs deleted file mode 120000 index a80bb2b..0000000 --- a/wellen/inputs +++ /dev/null @@ -1 +0,0 @@ -../inputs \ No newline at end of file