#glib

macro gvdb-macros

Convenience macros for gvdb

14 releases

0.1.13 Jul 12, 2024
0.1.12 Feb 22, 2024
0.1.11 Dec 2, 2023
0.1.10 Sep 9, 2023
0.1.4 May 17, 2022

#335 in GUI

Download history 971/week @ 2024-07-27 605/week @ 2024-08-03 758/week @ 2024-08-10 624/week @ 2024-08-17 606/week @ 2024-08-24 747/week @ 2024-08-31 733/week @ 2024-09-07 925/week @ 2024-09-14 2012/week @ 2024-09-21 1026/week @ 2024-09-28 462/week @ 2024-10-05 459/week @ 2024-10-12 234/week @ 2024-10-19 243/week @ 2024-10-26 262/week @ 2024-11-02 250/week @ 2024-11-09

1,021 downloads per month

MIT/Apache

205KB
4.5K SLoC

About this crate

This crate offers convenience macros for gvdb. The macros are include_gresource_from_xml!() and include_gresource_from_dir!()

Crates.io

Examples

Compile a GResource XML file and include the bytes in the file.

use gvdb_macros::include_gresource_from_xml;
static GRESOURCE_BYTES: &[u8] = include_gresource_from_xml!("test-data/gresource/test3.gresource.xml");

Scan a directory and create a GResource file with all the contents of the directory.

use gvdb_macros::include_gresource_from_dir;
static GRESOURCE_BYTES: &[u8] = include_gresource_from_dir!("/gvdb/rs/test", "test-data/gresource/");

License

gvdb and gvdb-macros are available under the MIT OR Apache-2.0 license. See the LICENSES folder for the complete license text.

SVG icon files included in test-data/gresource/icons/ are available under the CC0-1.0 license and redistributed from Icon Development Kit. See CC0-1.0.txt and file for complete license text.

Dependencies

~5–12MB
~143K SLoC