Skip to content

Conversation

@petekubiak
Copy link
Contributor

@petekubiak petekubiak commented Dec 31, 2025

Description

  • Version bump 0.1.1 -> 0.2.0
  • Metadata is now embedded into .rodata section (or equivalent on Mac)
  • Linker script is now redundant and has been removed
  • Updated template and README to reflect changes
  • Addresses a couple of other minor issues

Fixes #34
Fixes #35
Fixes #36

Type of change

Please Tick the options that are relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Tested in a cross-compiled project targeting ESP32C3 created with the latest esp-generate (v1.1.0).
  • Tested in a natively compiled Linux project generated from the template with cargo generate

Checklist

  • My code follows the style guidelines of this project (this should be caught by the CI)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (this should be caught by the CI)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@petekubiak petekubiak self-assigned this Dec 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2025

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 3 0 0 0.02s
✅ JSON jsonlint 3 0 0 0.13s
✅ JSON prettier 3 0 0 0 0.44s
✅ MARKDOWN markdownlint 6 0 0 0 0.77s
✅ MARKDOWN markdown-table-formatter 6 0 0 0 0.24s
✅ RUST clippy yes no no 54.76s
✅ YAML prettier 5 0 0 0 0.48s
✅ YAML yamllint 5 0 0 0.31s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.3.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,RUST_CLIPPY,YAML_PRETTIER,YAML_YAMLLINT

MegaLinter is graciously provided by OX Security

@github-actions
Copy link
Contributor

MegaLinter has automatically applied linters fixes on this PR.
Please review the changes and merge if they are correct.
PR: #38

Co-authored-by: petekubiak <37507920+petekubiak@users.noreply.github.com>
print("*** To add the commitment issues crate to your project, run:");
print();
print("cargo add --git https://github.com/dysonltd/commitment-issues");
print("cargo add --build --git https://github.com/dysonltd/commitment-issues")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need an extra ; here maybe

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running this:

➜ cargo generate -g https://github.com/dysonltd/commitment-issues.git -b bugfix/esp-generate-linker-clash
Error: ⛔   Failed executing script: init.rhai

Caused by:
    Syntax error: Expecting ';' to terminate this statement (line 27, position 2)

~ 

@ScottGibb
Copy link
Contributor

@petekubiak when i ran this line:

cargo generate -g https://github.com/dysonltd/commitment-issues.git -b bugfix/esp-generate-linker-clash
I got the following error:

Error: ⛔   Failed executing script: init.rhai

Caused by:
    Syntax error: Expecting ';' to terminate this statement (line 27, position 2)

@ScottGibb
Copy link
Contributor

Running the following handcoded example i get the following:

Cargo.toml

[package]
name = "pete-test"
version = "0.1.0"
edition = "2021"
authors = ["Scott Gibb <scott.gibb@arm.com>"]

[dependencies]
commitment-issues = { git = "https://github.com/dysonltd/commitment-issues",  branch = "bugfix/esp-generate-linker-clash"}
[build-dependencies]
commitment-issues = { git = "https://github.com/dysonltd/commitment-issues",  branch = "bugfix/esp-generate-linker-clash"}

Output:

     Running `target/debug/pete-test`
Hello, world!

 Here is the binary's metadata:

Schema version:  1
Compile time:    2026-01-05T10:58:12Z
Commit hash:     9ea305fa7b
Is dirty build:  true
Tag description: 
Last author:     Scott Gibb

pete-test on  main [?] is 📦 v0.1.0 via 🦀 v1.91.1 took 18s 
➜ git tag v1.0

pete-test on  main [?] is 📦 v0.1.0 via 🦀 v1.91.1 
➜ cargo run
   Compiling pete-test v0.1.0 (/Users/scogib01/pete-test)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.54s
     Running `target/debug/pete-test`
Hello, world!

 Here is the binary's metadata:

Schema version:  1
Compile time:    2026-01-05T10:58:32Z
Commit hash:     9ea305fa7b
Is dirty build:  true
Tag description: v1.0
Last author:     Scott Gibb

@petekubiak
Copy link
Contributor Author

Thanks for catching that @ScottGibb !
Should be fixed now :)

use commitment_issues::include_metadata;

include_metadata!();
commitment_issues::include_metadata!();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the template generated by cargo generate use this oneline version too? i.e. template/src/main.rs

As such, you will also need to add the crate as a build dependency with:

```sh
cargo add --build --git https://github.com/dysonltd/commitment-issues

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the template to have this too

@ScottGibb
Copy link
Contributor

@petekubiak can confirm it works on mac xD

@petekubiak petekubiak merged commit 5ec3708 into main Jan 5, 2026
7 checks passed
@petekubiak petekubiak deleted the bugfix/esp-generate-linker-clash branch January 5, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants