diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ea7a543 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,87 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.4.0](https://github.com/oxibus/dbc-codegen/compare/v0.3.0...v0.4.0) - 2026-04-09 + +### Added + +- add `DBC_FILE_NAME` + ver, proper code formatting ([#131](https://github.com/oxibus/dbc-codegen/pull/131)) +- [**breaking**] streamline DBC code generation and file writing ([#128](https://github.com/oxibus/dbc-codegen/pull/128)) + +### Fixed + +- support large min/max values without precision loss ([#152](https://github.com/oxibus/dbc-codegen/pull/152)) +- handle duplicate signal names ([#126](https://github.com/oxibus/dbc-codegen/pull/126)) +- handle empty relevant msgs in from_can_message ([#125](https://github.com/oxibus/dbc-codegen/pull/125)) +- fix typo +- fix formatting errors +- fix factor/offset not getting applied to 0 for unsigned case +- fix duplicate enum names on multiplex messages +- fix issue where signed signals would be rendered as unsigned + +### Other + +- update expected errors to Rust 1.94 ([#153](https://github.com/oxibus/dbc-codegen/pull/153)) +- *(deps)* bump the all-cargo-version-updates group across 1 directory with 2 updates ([#145](https://github.com/oxibus/dbc-codegen/pull/145)) +- *(deps)* bump insta from 1.46.2 to 1.46.3 in the all-cargo-version-updates group ([#143](https://github.com/oxibus/dbc-codegen/pull/143)) +- upgrade to rust 1.93 stderr ([#142](https://github.com/oxibus/dbc-codegen/pull/142)) +- *(deps)* bump the all-cargo-version-updates group across 1 directory with 4 updates ([#141](https://github.com/oxibus/dbc-codegen/pull/141)) +- [**breaking**] remove main fn from generated code ([#138](https://github.com/oxibus/dbc-codegen/pull/138)) +- make many rendering fn methods on config ([#133](https://github.com/oxibus/dbc-codegen/pull/133)) +- *(deps)* bump clap from 4.5.54 to 4.5.55 in the all-cargo-version-updates group ([#134](https://github.com/oxibus/dbc-codegen/pull/134)) +- use `quote` crate to handle str escaping ([#132](https://github.com/oxibus/dbc-codegen/pull/132)) +- noop - dedup, cleanup, new type abstraction ([#130](https://github.com/oxibus/dbc-codegen/pull/130)) +- update shared tests, bump deps, freeze to rust 1.92 ([#127](https://github.com/oxibus/dbc-codegen/pull/127)) +- *(deps)* bump can-dbc from 8.0.0 to 8.0.1 in the all-cargo-version-updates group ([#129](https://github.com/oxibus/dbc-codegen/pull/129)) +- do not clean lock +- bump dependencies and enable verbose output for release actions ([#120](https://github.com/oxibus/dbc-codegen/pull/120)) +- [pre-commit.ci] pre-commit autoupdate ([#119](https://github.com/oxibus/dbc-codegen/pull/119)) +- Bump the all-cargo-version-updates group across 1 directory with 2 updates ([#118](https://github.com/oxibus/dbc-codegen/pull/118)) +- refactor write functions, improve CI, MSRV ([#116](https://github.com/oxibus/dbc-codegen/pull/116)) +- minor code cleanup ([#114](https://github.com/oxibus/dbc-codegen/pull/114)) +- generate and compile all .dbc files from test repo ([#113](https://github.com/oxibus/dbc-codegen/pull/113)) +- allow generated file to be used with `include!` ([#108](https://github.com/oxibus/dbc-codegen/pull/108)) +- Bump the all-cargo-version-updates group across 1 directory with 2 updates ([#111](https://github.com/oxibus/dbc-codegen/pull/111)) +- minor justfile fix, editorconfig ([#112](https://github.com/oxibus/dbc-codegen/pull/112)) +- Bump actions/cache from 4 to 5 in the all-actions-version-updates group ([#110](https://github.com/oxibus/dbc-codegen/pull/110)) +- OxiBUS onboarding cleanup ([#102](https://github.com/oxibus/dbc-codegen/pull/102)) +- run `just fmt` to cleanup imports ([#107](https://github.com/oxibus/dbc-codegen/pull/107)) +- Bump the all-cargo-version-updates group across 1 directory with 9 updates ([#106](https://github.com/oxibus/dbc-codegen/pull/106)) +- upgrade to can-dbc v8 ([#101](https://github.com/oxibus/dbc-codegen/pull/101)) +- Bump actions/checkout from 1 to 6 in the all-actions-version-updates group ([#104](https://github.com/oxibus/dbc-codegen/pull/104)) +- *(CI)* minor CI updates, automate dependabot ([#103](https://github.com/oxibus/dbc-codegen/pull/103)) +- Add optional defmt::Format support for generated types +- Merge pull request #85 from inomotech-foss/fix-mux-msg-id +- Use message name instead of self +- Generate embedded_can::Frame trait for each frame +- Represent CAN message IDs as embedded_can::Id to support extended IDs +- Fix issue with decoding signed values of non-standard length +- revert change to Cargo.toml, not necessary +- address clippy's concerns (thanks clippy), enhance comments +- make can-messages dependency optional so it doesn't pull in std +- reduce diff against main +- handle more edge cases, use i128 as the maximum type +- reorder lines to match signals +- drop symlink in favor of copy so it works on Windows +- revert because I missed the case of check_ranges being false +- add tests, edge cases where the min/max is way less than signal width +- clean up warning +- add unsigned to the name, add test case +- change signal logic to handle negative factors, add tests +- Bump rustc to latest stable, 1.78 +- Merge pull request #68 from projectgus/tweaks/codegen_warnings +- Rename .envrc for non-Nix users, add note in README +- dont assign signed integers to unsigned integers +- Update README +- Fix clippy warnings +- Use checked_sub(offset) for set_signal methods +- Don't treat signals as floats if factor is integer +- Add flag to impl std Error +- Tweak docs and optional features +- Make feature-gated impls configurable diff --git a/Cargo.lock b/Cargo.lock index 64da682..f4c841a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,7 +47,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -58,7 +58,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.57" +version = "1.2.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" +checksum = "b7a4d3ec6524d28a329fc53654bbadc9bdd7b0431f5d65f1a56ffb28a1ee5283" dependencies = [ "find-msvc-tools", "shlex", @@ -282,14 +282,13 @@ checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", - "windows-sys 0.59.0", + "windows-sys", ] [[package]] @@ -313,7 +312,7 @@ dependencies = [ [[package]] name = "dbc-codegen" -version = "0.3.0" +version = "0.4.0" dependencies = [ "anyhow", "bitvec", @@ -332,7 +331,7 @@ dependencies = [ [[package]] name = "dbc-codegen-cli" -version = "0.3.0" +version = "0.4.0" dependencies = [ "clap", "dbc-codegen", @@ -424,7 +423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -435,9 +434,9 @@ checksum = "de853764b47027c2e862a995c34978ffa63c1501f2e15f987ba11bd4f9bba193" [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "find-msvc-tools" @@ -497,9 +496,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51" [[package]] name = "heck" @@ -515,21 +514,21 @@ checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.0", "serde", "serde_core", ] [[package]] name = "insta" -version = "1.46.3" +version = "1.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4" +checksum = "7b4a6248eb93a4401ed2f37dfe8ea592d3cf05b7cf4f8efa867b6895af7e094e" dependencies = [ "console", "once_cell", @@ -566,9 +565,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.183" +version = "0.2.184" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" [[package]] name = "libloading" @@ -786,9 +785,9 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" [[package]] name = "rustix" @@ -800,7 +799,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -814,9 +813,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" @@ -863,9 +862,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] @@ -932,7 +931,7 @@ dependencies = [ "getrandom", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -978,9 +977,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.0.7+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd28d57d8a6f6e458bc0b8784f8fdcc4b99a437936056fa122cb234f18656a96" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" dependencies = [ "indexmap", "serde_core", @@ -993,27 +992,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.1+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b320e741db58cac564e26c607d3cc1fdc4a88fd36c879568c07856ed83ff3e9" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.0.10+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.0.7+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17aaa1c6e3dc22b1da4b6bba97d066e354c7945cac2f7852d4e4e7ca7a6b56d" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" [[package]] name = "trybuild" @@ -1154,7 +1153,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys", ] [[package]] @@ -1163,15 +1162,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -1181,75 +1171,11 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "winnow" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" [[package]] name = "wit-bindgen" diff --git a/Cargo.toml b/Cargo.toml index 8038ba7..7ec066b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dbc-codegen" -version = "0.3.0" +version = "0.4.0" description = "CAN DBC code-gen for embedded Rust" authors = [ "Pascal Hertleif ", diff --git a/dbc-codegen-cli/CHANGELOG.md b/dbc-codegen-cli/CHANGELOG.md new file mode 100644 index 0000000..8d8ceb0 --- /dev/null +++ b/dbc-codegen-cli/CHANGELOG.md @@ -0,0 +1,28 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.4.0](https://github.com/oxibus/dbc-codegen/compare/v0.3.0...v0.4.0) - 2026-04-09 + +### Added + +- [**breaking**] streamline DBC code generation and file writing ([#128](https://github.com/oxibus/dbc-codegen/pull/128)) + +### Other + +- minor code cleanup ([#114](https://github.com/oxibus/dbc-codegen/pull/114)) +- allow generated file to be used with `include!` ([#108](https://github.com/oxibus/dbc-codegen/pull/108)) +- OxiBUS onboarding cleanup ([#102](https://github.com/oxibus/dbc-codegen/pull/102)) +- run `just fmt` to cleanup imports ([#107](https://github.com/oxibus/dbc-codegen/pull/107)) +- Bump the all-cargo-version-updates group across 1 directory with 9 updates ([#106](https://github.com/oxibus/dbc-codegen/pull/106)) +- upgrade to can-dbc v8 ([#101](https://github.com/oxibus/dbc-codegen/pull/101)) +- make debug_prints configurable +- Merge pull request #68 from projectgus/tweaks/codegen_warnings +- Rename .envrc for non-Nix users, add note in README +- Update README +- Make feature-gated impls configurable diff --git a/dbc-codegen-cli/Cargo.toml b/dbc-codegen-cli/Cargo.toml index 0ebcfea..9095523 100644 --- a/dbc-codegen-cli/Cargo.toml +++ b/dbc-codegen-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dbc-codegen-cli" -version = "0.3.0" +version = "0.4.0" description = "CLI for CAN DBC codegen" authors = [ "Pascal Hertleif ", @@ -16,7 +16,7 @@ repository = "https://github.com/oxibus/dbc-codegen" [dependencies] clap = { version = "4.5", features = ["derive"] } -dbc-codegen = { version = "0.3", path = ".." } +dbc-codegen = { version = "0.4", path = ".." } exitcode = "1.1.2" [[bin]]