Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add printf support for circuit debugging #1431

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

crStiv
Copy link

@crStiv crStiv commented Feb 26, 2025

Description

Adds Printf functionality to the frontend.API interface with format specifiers support for better circuit debugging capabilities. This allows developers to debug circuit variables with formatted output similar to fmt.Printf.

Fixes #1239

Type of change

  • New feature (non-breaking change which adds functionality)

How has this been tested?

  • Unit tests in examples/printf_example_test.go verify basic functionality
  • Example circuit in examples/printf_example.go demonstrates all format specifiers (%d, %x, %b, %v)
  • Tests verify circuit compilation and execution with Printf statements

How has this been benchmarked?

Not applicable - this is a debugging feature that is not used in production circuits.

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I did not modify files generated from templates
  • New and existing unit tests pass locally with my changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add format specifiers for api.Println or implement api.Printf
1 participant