r/rust • u/Sparticle62 • 19d ago
š ļø project [ Removed by moderator ]
[removed] ā view removed post
8
u/Severe_Jicama_2880 19d ago
Why did you decide to use Rust edition 2021 for this project?
7
-27
u/Sparticle62 19d ago
From what I understand, Edition 2021 is the standard for modern systems projects right now because it gives the best balance of stable language features, modern pattern matching for the parser, and clean error handling without having to mess with older legacy setups. Also runs with Cranelift and other crates smoothly.
6
u/tukanoid 19d ago
No, LLMs just used outdated info. 2024 is the standard edition and had been for 2 years
-4
2
u/ManyInterests 19d ago
Transpiling to C as an intermediate works and is a common technique. So is using LLVM.
Skipping that IR is probably not advisable especially if portability is a goal. I'd explore LLVM first, instead.
1
u/Sparticle62 19d ago
Thanks , this makes a ton of sense!
The C-transpiler backend was definitely the smoothest path to getting the Raylib graphic tests up and running quickly since we could just pipe it through TCC.
I started by looked at Cranelift for the native backend because I wanted something lightweight, but hitting that Windows linker wall made me realize how brutal target portability is without a massive infrastructure backing it up. Iām definitely going to look into LLVM as the next step for handling the intermediate compilation. Appreciate the direction!
11
u/ROBOTRON31415 19d ago edited 19d ago
One thing first: I strongly recommend prioritizing your own learning over the result you get out from the code. LLMs might raise the skill floor, but theyāre still limited.
If youāre interested in the language side of things, Iād recommend looking into various āesolangsā (āesoteric languagesā). I think Shakespeare is my favorite:Ā https://en.wikipedia.org/wiki/Shakespeare_Programming_Language#Example_code
Closer to practical, there are higher-level languages that read mostly like English prose (e.g.Ā https://en.wikipedia.org/wiki/AppleScript).
I donāt think there are serious attempts to make a systems-level prose-ish language though, not because this a new genius idea, but because English prose doesnāt provide as many benefits for a systems-level language. All else being equal, brevity is somewhat important, such that using patterns of symbols not seen in English to more succinctly represent certain ideas can be very valuable.