runner icon indicating copy to clipboard operation
runner copied to clipboard

Fix issue #13 and future hard error warning

Open durbanlegend opened this issue 11 months ago • 0 comments

  1. Issue #13: added *RUSTUP to env:DYLD_FALLBACK_LIBRARY_PATH for dynamic execution, as per dwaltrip's workaround. Can test simply with Hello.rs before and after.
  2. Updated serde/serde_json versions in Cargo.toml to remove dependence on outdated syn crate that was causing a future hard error warning. Tested json.rs.
  3. Amended examples/json.rs to bring it in line with readme.md

Background: As a retired dev learning Rust I was interested in a Rust REPL and/or script runner for Mac, as I find the Rust playground a bit slow and limited. I looked at evcxr, irust, cargo-script, rust-script, ogma, cargo-play and Rust Playground for Macos, and or course Runner. I like rust-script and cargo-play, but I felt that Runner has the most versatility and freedom to experiment. Despite all this potential it currently seems to be dormant.

The changes proposed here are minimal and intended to fix the most intrusive issues, in particular #13.

For my own purposes I've upgraded my clone to 0.6.0 and included an enhancement for Issue #9 (stdin) as well as upgrading the edition to 2021, updating all the package versions and using rustc (emit metadata) to further check if a source containing fn main() is a well-formed Rust program. I've been careful to respect your choices in using the features of lapp and easy_shortcuts in particular. I want to keep it fast, slick, well-crafted, versatile and easy to use, to the best of my ability.

On my clone I've also let RustFmt auto-format the code and applied Clippy::pedantic suggestions to reduce background noise from Cargo as well as being educational for me. I would also like to extend it a bit further to have a REPL option, and refactor the main method to split out the different steps as individual methods. However, all of this means there are already a lot of lines of code with changes with potentially many more to come, and I want to respect your intentions and your expertise from which I've learnt a lot, so I'm open to either forking it or helping update it and take it further. Please let me know how you feel.

PS: Are you a fellow Saffer? Just noticed Jo'burg on your profile. I'm from KZN. Regards, Don Forbes

durbanlegend avatar Mar 11 '24 18:03 durbanlegend