UPDATE: I found this issue explaining the relicensing of rust game engine Bevy to MIT + Apache 2.0 dual. Tldr: A lot of rust projects are MIT/Apache 2.0 so using those licenses is good for interoperability and upstreaming. MIT is known and trusted and had great success in projects like Godot....
LGPL specifically does as far as I understand have some issues when used in rust. In particular the border for the copyleft is dynamic linking. That doesn’t work well with rust. I would instead consider MPL where the copyleft border is on a source file level.
I really don’t see what niche it is trying to fill that isn’t already occupied.
Rust is as successful as it is because it found a previously unoccupied niche: safe systems programming without garbage collector and with high level abstractions that (mostly) optimise away.
I don’t think “better C” is a big enough niche to be of interest to enough people for it to gain a critical mass. I certainly have very little interest in it myself.
For a current project, I’ve been struggling with my language files. They’re all JSON files, and will always fallback to English if translations aren’t available....
Your idea will work with minor changes (if comments are supported in your file format). At work our tooling create entries like 123=“English text” // UNTRANSLATED. Obviously not quite the same format, but it should be adaptable to any format that supports comments.
There are existing approaches: GNU gettext and Mozilla fluent comes to mind. I would try to use one of those. I understand that Mozilla Fluent has good support for the Web (unsurprisingly).
I want to build a small gui application in rust. What are my options for application storage? I have heard of the confi crate but I want to save a bit more than just configuration. Is there a crate that handles this for me easily?
Be sure to treat state and configuration separately. It doesn’t matter on Windows as far as I know (they go in the same location), but on Linux those are supposed to go in different places.
Many programs get this wrong, and it is quite annoying as I track my config files in git. I don’t want a diff just because the list of recently opened files changed! Or even worse: the program stores the last window size and position in the config file… (looking at you KDE!)
Here are some libraries I found to help with this in a cross platform way:
I haven’t tried either, haven’t written such a program yet.
As for how to store data, there are indeed many options, depending on your needs:
Plain text based formats (toml, yaml, JSON, ini, …) can be good for configs and basic state. As a bonus it let’s the user easily manage the file in version control if they are so inclined.
Databases (SQLite mostly)
Custom formats (binary files in a directory structure is often used for browser caches for example) .
Without knowing more it is hard to give specific advise.
Why are all the rust projects MIT licensed?
UPDATE: I found this issue explaining the relicensing of rust game engine Bevy to MIT + Apache 2.0 dual. Tldr: A lot of rust projects are MIT/Apache 2.0 so using those licenses is good for interoperability and upstreaming. MIT is known and trusted and had great success in projects like Godot....
Let's talk about Zig
I have been reading about this new language for a while. It’s a C competitor, very slim language with very interesting choices, like supporting cross platform compilation out of the box, supports compiling C/C++ code (and can be used as a drop in replacement for C) to the point in can be used as replacement of ©make and...
Rust Malware Staged on Crates.io (blog.phylum.io)
How do you handle language files?
For a current project, I’ve been struggling with my language files. They’re all JSON files, and will always fallback to English if translations aren’t available....
How to handle application storage in rust?
I want to build a small gui application in rust. What are my options for application storage? I have heard of the confi crate but I want to save a bit more than just configuration. Is there a crate that handles this for me easily?