Skip to content

Design & Write language agnostic bindings format #247

Closed
@makspll

Description

@makspll

Given metadata and information about types functions and arguments, we should be able to produce "bindings" definition files, let's call them language agnostic definition files or LAD's.

These should contain everything we might need for generating:

  • documentation
  • language server definition files
  • lints

I am imagining something along the lines of:

{
 "types": [
   {
     "name": "MyType",
     "id": 1234
     "path": "my_crate::mod",
     "generics": ["T"],
     "docstring": "A type that does type things...",
     "methods": [
       0,4,6
     ],
     "fields": [
        ...
     ],
     "variants": [
       ...
    ]
   }
 ],
 "functions": [
    "name": "my_func",
    "path": "my_crate::mod::func",
    "docstring": "a function that does function things...",
    "arguments": [
        {
            "type": 1234,
            "name": "my_arg",
            "kind": "Ref"
        }
    ]
 ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions