#freedesktop #desktop #entry

freedesktop-desktop-entry

Freedesktop Desktop Entry Specification

36 releases

0.8.1 Jan 6, 2026
0.8.0 Dec 16, 2025
0.7.19 Sep 30, 2025
0.7.13 May 28, 2025
0.1.1 Jul 7, 2019

#61 in Unix APIs

Download history 4598/week @ 2026-01-10 5105/week @ 2026-01-17 6550/week @ 2026-01-24 6878/week @ 2026-01-31 6421/week @ 2026-02-07 4936/week @ 2026-02-14 5590/week @ 2026-02-21 5577/week @ 2026-02-28 6554/week @ 2026-03-07 6031/week @ 2026-03-14 6647/week @ 2026-03-21 5797/week @ 2026-03-28 6184/week @ 2026-04-04 5026/week @ 2026-04-11 5169/week @ 2026-04-18 7855/week @ 2026-04-25

25,285 downloads per month
Used in 24 crates (20 directly)

MPL-2.0 license

63KB
1.5K SLoC

Freedesktop Desktop Entry Specification

crates.io docs.rs

This crate provides a library for efficiently parsing Desktop Entry and similar files.

use freedesktop_desktop_entry::{default_paths, get_languages_from_env, Iter, PathSource};

fn main() {
    let locales = get_languages_from_env();

    let entries = Iter::new(default_paths())
        .entries(Some(&locales))
        .collect::<Vec<_>>();
    
    for entry in entries {
        let path_src = PathSource::guess_from(&entry.path);

        println!("{:?}: {}\n---\n{}", path_src, entry.path.display(), entry);
    }
}

License

Licensed under the Mozilla Public License 2.0. Permissions of this copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.

Contribution

Any contribution intentionally submitted for inclusion in the work by you shall be licensed under the Mozilla Public License 2.0 (MPL-2.0). It is required to add a boilerplate copyright notice to the top of each file:

// Copyright {year} {person OR org} <{email}>
// SPDX-License-Identifier: MPL-2.0

Dependencies

~0.7–3.5MB
~34K SLoC