An open API service indexing awesome lists of open source software.

https://github.com/webfreak001/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.
https://github.com/webfreak001/ctfe-data

Last synced: 5 months ago
JSON representation

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.

Awesome Lists containing this project

README

          

# 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 on linux. GDC on linux needs `align(16)` on the passed in data.

## Example

```d
// app code
injectCTFE!(ExamplePerson("Person inside main", 2));
```

```d
// reader code
foreach (row; extractCTFEData!ExamplePerson("./app1"))
writeln("row: ", row);
```

```
cd example
dub build --compiler=ldc2 --config=application
dub run --compiler=ldc2 --config=reader
```