Post AXLsIVKUnSmK5fL5do by tamtararam@chaos.social
 (DIR) More posts by tamtararam@chaos.social
 (DIR) Post #AXLsIRLPc78PjLjlVw by tamtararam@chaos.social
       2023-06-15T23:08:32Z
       
       1 likes, 0 repeats
       
       Hey friens, sorry I'm kinda new to Rust. Is this how you are meant to write a Hello World program?
       
 (DIR) Post #AXLsITMY6rETzSHhZ2 by tamtararam@chaos.social
       2023-06-16T07:55:16Z
       
       1 likes, 0 repeats
       
       While that crate I used was nice, I realised that I shouldn't rely on an external crate just for a simple "Hello World" program.So I revised my program:
       
 (DIR) Post #AXLsIVKUnSmK5fL5do by tamtararam@chaos.social
       2023-06-16T12:15:52Z
       
       0 likes, 0 repeats
       
       The previous version SIGSEVS in releases builds during the deallocation phase (aka when the main scope is closed). It told libc to deallocate 0x1 for some reasons lol.So I made a third version and also included a little compare to see if the kernel wrote all bytes of the string. Oh and added a few comments for your pleasure to understand a little better.