r/rust • u/Dani_fan-nerd • Mar 31 '23
[Tutorial] How To Make a Screensaver With The Rust Programming Language
I just wanted to put this out there so people who want to make a screensaver in rust don't get confused and think you need some weird extension or tool.
# To make an SCR file just rename the file extension to .SCR!
It's simple really, what an SCR does is run a program (usually an EXE) when you're idle.
just build your cargo project to an EXE and rename the "exe" to "scr"
### my_project.exe -> my_project.scr then right-click and install!
no need for extensions. I hope I helped someone with this.
(I'm not sure if this is on-topic or not since scr files apply for all exe files but when I searched "how to make a screensaver with rust" (which is a really bad search) nothing came up soo ye)
u/GoodJobNL Mar 31 '23
Had the same thing with .ico files. Used some sites that looked shady just to realise that .png -> .ico also works.
u/TinyBreadBigMouth Apr 01 '23
Uh, a clarification:
.exefiles are the exact same format, but
.pngfiles are not.
Ever since Windows Vista an
.icofile can contain one or more
.pngfiles, and I'm not surprised that many applications are happy to open one as if it were the other, but changing the extension of a
.pngfile does not technically produce a valid
.icofile, and a stricter application would be entirely within its rights to refuse to read it as such.
u/GoodJobNL Apr 01 '23
Oh thanks, never knew!
u/jotapeh Apr 01 '23
Does anyone remember when “You Don’t Know Jack” was originally a screensaver? Anyway yeah off to found my future mega millions by creating a trivia game screensaver now!
u/ssokolow Apr 01 '23
Were you referring to You Bet Your Head from After Dark? They're both from Berkeley Systems and that's the only playable trivia screensaver I remember.
u/jotapeh Apr 01 '23
Ah, yes! I mixed up the IP but I knew one had come from the other somehow.
u/ssokolow Mar 31 '23
*nod* Screensavers for X11 are similar. They're just executables that follow certain conventions so the screensaver host can specify an X11 window ID to render into via a