Automatically generate C/C++ header file when building shared library
Open
enhancement
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 603
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 6
Description
I am reading about Codon's [C/C++ integration](https://docs.exaloop.io/codon/interoperability/cpp) and it seems that there is a need to manually translate
```python
@export
def foo(n: int):
```
into
```c
int64_t foo(int64_t);
```
It would be nice, if
```bash
codon build -o libfoo.so foo.codon
```
automatically generated C/C++ header file, that could be included from C/C++ code:
```c
#include "foo.h"
```
Go language has this functionality. Running
```bash
go build -o libfoo.so -buildmode=c-shared foo.go
```
will generate `foo.h` as well as `libfoo.so`.
Contributor guide
Assessment
This issue has not been assessed yet.