Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bnjbvr/rouille

Rust programming, in French.
https://github.com/bnjbvr/rouille

Last synced: 25 days ago
JSON representation

Rust programming, in French.

Awesome Lists containing this project

README

        

# rouille

![](https://github.com/bnjbvr/rouille/raw/principale/logo.jpeg)

Aren't you _le tired_ from writing Rust programs in English? Do you like saying
"merde" a lot? Would you like to try something different, in an exotic and
funny-sounding language? Would you want to bring some French touch to your
programs?

**rouille** (French for _Rust_) is here to save your day, as it allows you to
write Rust programs in French, using French keywords, French function names,
French idioms.

This has been designed to be used as the official programming language to
develop the future French sovereign operating system.

If you're from the French or any other governement with French as an official
language: I will be awaiting your donations on
[liberapay](https://liberapay.com/bnjbvr/).

You're from Quebec (or elsewhere) and don't feel at ease using only French words?

Don't worry!
French Rust is fully compatible with English-Rust, so you can mix both at your
convenience.

Here's an example of what can be achieved with Rouille:

### trait and impl (aka convention et réalisation)

```rust
rouille::rouille! {
utilisons std::collections::Dictionnaire comme Dico;

convention CléValeur {
fonction écrire(&soi, clé: Chaîne, valeur: Chaîne);
fonction lire(&soi, clé: Chaîne) -> PeutÊtre<&Chaîne>;
}

statique mutable DICTIONNAIRE: PeutÊtre> = Rien;

structure Concrète;

réalisation CléValeur pour Concrète {
fonction écrire(&soi, clé: Chaîne, valeur: Chaîne) {
soit dico = dangereux {
DICTIONNAIRE.prendre_ou_insérer_avec(Défaut::défaut)
};
dico.insérer(clé, valeur);
}
fonction lire(&soi, clé: Chaîne) -> Résultat, Chaîne> {
si soit Quelque(dico) = dangereux { DICTIONNAIRE.en_réf() } {
Bien(dico.lire(&clé))
} sinon {
Arf("fetchez le dico".vers())
}
}
}
}
```

### Support for regional languages

```rust
#[légal(code_inaccessible)]
fonction secondaire() {
merde!("oh non"); // for the true French experience
calisse!("tabarnak"); // for friends speaking fr-ca
oups!("fetchez la vache"); // in SFW contexts
}
```

### Other examples

See the [examples](./examples/src/main.rs) to get a rough sense of the whole
syntax. Voilà, that's it.

## les contributions

First of all, _merci beaucoup_ for considering participating to this joke, the
French government will thank you later! Feel free to throw in a few identifiers
here and there, and open a pull-request against the `principale` (French for
`main`) branch.

Please don't introduce swear words, though: we will not excuse your French.

## but why would you do zat

- horsin around
- playing with raw proc macros
- making a bit of fun about programming languages that do this seriously,
though I can see their utility.
- winking at [Marcel](https://github.com/brouberol/marcel)
- c'est chic

## Other languages

- Dutch: [roest](https://github.com/jeroenhd/roest)
- German: [rost](https://github.com/michidk/rost)
- Polish: [rdza](https://github.com/phaux/rdza)
- Italian: [ruggine](https://github.com/DamianX/ruggine)
- Russian: [Ржавый](https://github.com/Sanceilaks/rzhavchina)
- Esperanto: [rustteksto](https://github.com/dscottboggs/rustteksto)
- Hindi: [zung](https://github.com/rishit-khandelwal/zung)
- Hungarian: [rozsda](https://github.com/jozsefsallai/rozsda)
- Chinese: [xiu (锈)](https://github.com/lucifer1004/xiu)
- Spanish: [rustico](https://github.com/UltiRequiem/rustico)
- Korean: [Nok (녹)](https://github.com/Alfex4936/nok)
- Finnish: [ruoste](https://github.com/vkoskiv/ruoste)
- Arabic: [sada](https://github.com/LAYGATOR/sada)
- Turkish: [pas](https://github.com/ekimb/pas)
- Vietnamese: [gỉ](https://github.com/Huy-Ngo/gir)
- Japanese: [sabi (錆)](https://github.com/yuk1ty/sabi)
- Danish: [rust?](https://github.com/LunaTheFoxgirl/rust-dk)
- Marathi: [gan̄ja](https://github.com/pranavgade20/ganja)
- Romanian: [rugină](https://github.com/aionescu/rugina)
- Czech: [rez](https://github.com/radekvit/rez)
- Ukrainian: [irzha](https://github.com/brokeyourbike/irzha)
- Bulgarian: [ryzhda](https://github.com/gavadinov/ryzhda)
- Slovak: [hrdza](https://github.com/TheMessik/hrdza)
- Catalan: [rovell](https://github.com/gborobio73/rovell)
- Corsican: [rughjina](https://github.com/aldebaranzbradaradjan/rughjina)
- Indonesian: [karat](https://github.com/annurdien/karat)
- Lithuanian: [rūdys](https://github.com/TruncatedDinosour/rudys)
- Greek: [skouriasmeno](https://github.com/devlocalhost/skouriasmeno)
- Thai: [sanim (สนิม)](https://github.com/korewaChino/sanim)
- Swiss: [roeschti](https://github.com/Georg-code/roeschti)
- Swedish: [rost](https://github.com/vojd/rost/)
- Croatian: [hrđa](https://github.com/njelich/hrdja)
- Persian: [zangar (زنگار)](https://github.com/ui-ce/zangar)
- Malagasy: [arafesina](https://github.com/luckasRanarison/arafesina)
- All of the above: [unirust](https://github.com/charyan/unirust)

## un grand merci

- [@VentGrey](https://twitter.com/VentGrey) for making a logo!

## la license

[License Publique Rien à Branler](http://sam.zoy.org/lprab/),
_le_ official translation of the [WTFPL](http://www.wtfpl.net/)
by the same author.