# Nexus 6 C Interoperability

## Import C ABI functions

```nexus
extern "C" fn puts(s: str) -> i32;
```

Hosted builds emit a normal C ABI declaration and link it with the host toolchain. Only ABI `C` is accepted in 6.0.0.

Native Frames FEX targets reject extern declarations until their linker has a defined external relocation model.

## Generate Nexus declarations from a C header

```bash
nexus bindgen-c library.h -o library_bindings.nx --module library_bindings
```

The 6.0 bindgen intentionally accepts a conservative scalar/pointer prototype subset. Unsupported declarations are skipped instead of guessed.

## Export Nexus public API as C

```bash
nexus export-c src/api.nx -o include/api.h
```

Only public, non-generic, synchronous functions composed of stable scalar/reference ABI types are exported.
