Skip to content

Carry docstrings / argument metadata through the ABI so wrappers can emit signatures #18

Description

@timholy

The ABI is a positional C calling convention; docstrings, keyword arguments, default values, and human-meaningful signatures are all lost. Generated Python functions have no docstring, no type hints, and no defaults.

Why it matters

For scientific users of other languages, the docstring is a large part of usability.

Concrete example

NMFMerge's nmfmerge has a rich docstring and keyword arguments (tol_intermediate, W0, H0, alg). None of it appears anywhere in the ABI JSON, so no backend can surface it.

Suggested direction

This is mostly a juliac-side request — the ABI JSON would need an optional docstring / parameter-metadata field. JuliaLibWrapping's part is to advocate for that field and to emit docstrings / type hints when it is present. Filed here as a tracking issue; cross-reference a juliac issue once opened.

Minor related observation

The current ABI JSON already carries isptr and isfieldatomic per field, which from_json(FieldDesc, …) silently ignores. Harmless today, but isfieldatomic may eventually matter for correctness — worth a deliberate decision rather than a silent drop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions