The resource embedder allows to embed files in binaries by producing C, Ada or Go source files that contain the original files.
To generate a config.ads and config.adb Ada package with the resources, you may use:
are --lang=Ada -o src --resource=config --name-access --fileset='**/*.conf' configComplex resource integrations are best described with and XML and are generated with:
are --lang=Ada -o src --rule=package.xml --name-access .For Ada, it generates the following package declaration with the Get_Content function that gives access to the files. The Ada body contains the content of each embedded file.
package Config is
function Get_Content (Name : in String)
return access constant String;
end Config;Globally install this crate:
alr install areAdd to your project:
alr with areDependencies: 1
Dependents: 0
Versions: 6
~21.0.0