Skip to content

WebFreak001/ctfe-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ctfe-data

Allows you to put arbitrary data into the executable at CTFE, for later retrieval using a runtime process, e.g. saving meta-data and retreiving it later.

Limitations: currently only supported on LDC and GDC on linux. GDC on linux further needs align(16) on the passed in data.

Example

// app code
injectCTFE!(ExamplePerson("Person inside main", 2));
// reader code
foreach (row; extractCTFEData!ExamplePerson("./app1"))
	writeln("row: ", row);
cd example
dub build --compiler=ldc2 --config=application
dub run --compiler=ldc2 --config=reader

About

Allows you to put arbitrary data into the executable at CTFE, for later retrieval using a runtime process, e.g. saving meta-data and retreiving it later.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages