{"id":15067655,"url":"https://github.com/louib/flatpak-rs","last_synced_at":"2025-07-18T05:03:29.579Z","repository":{"id":38789523,"uuid":"419077508","full_name":"louib/flatpak-rs","owner":"louib","description":"Flatpak library for Rust.","archived":false,"fork":false,"pushed_at":"2022-08-17T23:45:03.000Z","size":186,"stargazers_count":5,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-21T02:18:58.883Z","etag":null,"topics":["flatpak","lib","library","linux","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/louib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-19T20:14:10.000Z","updated_at":"2022-08-15T01:11:27.000Z","dependencies_parsed_at":"2022-08-19T23:20:38.134Z","dependency_job_id":null,"html_url":"https://github.com/louib/flatpak-rs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/louib/flatpak-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louib%2Fflatpak-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louib%2Fflatpak-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louib%2Fflatpak-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louib%2Fflatpak-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louib","download_url":"https://codeload.github.com/louib/flatpak-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louib%2Fflatpak-rs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265703011,"owners_count":23813904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flatpak","lib","library","linux","rust","rust-lang"],"created_at":"2024-09-25T01:25:37.503Z","updated_at":"2025-07-18T05:03:29.541Z","avatar_url":"https://github.com/louib.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flatpak-rs\nFlatpak library for Rust.\n\n![Tests status](https://github.com/louib/flatpak-rs/workflows/tests/badge.svg)\n![Code formatting](https://github.com/louib/flatpak-rs/workflows/formatting/badge.svg)\n![Documentation](https://github.com/louib/flatpak-rs/workflows/doc/badge.svg)\n[![dependency status](https://deps.rs/repo/github/louib/flatpak-rs/status.svg)](https://deps.rs/repo/github/louib/flatpak-rs)\n[![Crates.io version](https://img.shields.io/crates/v/flatpak-rs?style=flat-square)](https://crates.io/crates/flatpak-rs)\n[![License file](https://img.shields.io/github/license/louib/flatpak-rs)](https://github.com/louib/flatpak-rs/blob/master/LICENSE)\n\nThis library offers functions to parse and dump [flatpak](https://github.com/flatpak/flatpak) application,\nmodule or source manifests. The goal of the library is to be compliant with what\n[`flatpak-builder`](https://github.com/flatpak/flatpak-builder) supports.\n\nSee the [API documentation](https://docs.rs/flatpak/) for this library.\n\n## Installation\nAdd the library to your `Cargo.toml`:\n```ignore\nflatpak = \"0\"\n```\n\nExperimental TOML support is available via the `toml` feature:\n```ignore\nflatpak = { version = \"0\", features = [\"toml\"] }\n```\n\nNote that this library is aliased as both `flatpak` and `flatpak-rs` on crates.io.\n\n## Usage\nAll three denominations of Flatpak manifests can be parsed using this library,\nusing the `FlatpakApplication`, `FlatpakModule` and `FlatpakSource` structs.\n\n### Parse from a string\n```rust\nuse flatpak_rs::application::FlatpakApplication;\nuse flatpak_rs::format::FlatpakManifestFormat;\n\nlet manifest = r###\"\n    app-id: net.louib.flatpak-rs\n    runtime: org.gnome.Platform\n    runtime-version: \"3.36\"\n    sdk: org.gnome.Sdk\n    command: flatpak-rs\n    tags: [\"nightly\"]\n    modules:\n      -\n        name: \"flatpak-rs\"\n        buildsystem: simple\n        cleanup: [ \"*\" ]\n        config-opts: []\n        sources:\n          -\n            type: git\n            url: https://github.com/louib/flatpak-rs.git\n            branch: master\n      -\n        \"shared-modules/linux-audio/lv2.json\"\n\"###;\n\nlet application = FlatpakApplication::parse(FlatpakManifestFormat::YAML, manifest).unwrap();\n\nassert_eq!(\u0026application.app_id, \"net.louib.flatpak-rs\");\nassert_eq!(application.modules.len(), 2 as usize);\n\nprintln!(\"Parsed application manifest for {}.\", \u0026application.app_id);\n```\n### Parse from a file\n```rust\nuse std::env;\n\nuse flatpak_rs::application::FlatpakApplication;\n\nfn main() {\n    let args: Vec\u003cString\u003e = env::args().collect();\n    if args.len() \u003c 2 {\n        eprintln!(\"Please provide a flatpak application manifest to parse.\");\n        return;\n    }\n    let manifest_path = \u0026args[1];\n\n    let application = FlatpakApplication::load_from_file(manifest_path.clone()).unwrap();\n    println!(\"Parsed application manifest for {}.\", \u0026application.get_id());\n}\n\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouib%2Fflatpak-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouib%2Fflatpak-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouib%2Fflatpak-rs/lists"}