Skip to content

Improve hello.rue example and remove linker debug output#882

Open
seth-schultz wants to merge 2 commits intorue-language:trunkfrom
seth-schultz:improvements
Open

Improve hello.rue example and remove linker debug output#882
seth-schultz wants to merge 2 commits intorue-language:trunkfrom
seth-schultz:improvements

Conversation

@seth-schultz
Copy link

Summary

Two quality-of-life improvements:

1. Update hello.rue to print Hello, World!

The classic first program should actually print something! Updated from just returning 42 to using @dbg to print the greeting.

2. Remove debug print statements from linker

The linker was printing 200+ DEBUG: lines during normal compilation. Removed all unconditional debug output from:

  • crates/rue-linker/src/linker.rs
  • crates/rue-linker/src/macho.rs

Also converted a sanity check from eprintln! to debug_assert_eq! for the text_file_offset verification.

Testing

  • ./quick-test.sh passes
  • ./buck2 run //crates/rue-spec:rue-spec -- "arithmetic" passes (70 tests)
  • Verified hello.rue compiles and runs correctly
  • Verified no more DEBUG output during compilation

The classic first program should actually print something!
These eprintln! statements were printing 200+ DEBUG lines during
normal compilation. Removed all unconditional debug output and
converted the text_file_offset sanity check to a debug_assert.
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.

1 participant