Skip to content

External functions, foreign function interface. #8

Open
@elucent

Description

@elucent

Support the definition of functions with undefined bodies. These functions must have full type annotations, and represent external symbols that will be resolved at link time. This will allow Basil to interact with native libraries and substantially broaden the kinds of applications Basil can be used in.

In the current Basil runtime, code is JIT-compiled, so we'd need to create our own linker of sorts to find the implementations of these functions. For a start, we should consider just supporting shared objects, to avoid having to parse ELF files. We can consider full-on AOT compilation for a later issue.

Metadata

Metadata

Assignees

Labels

planned featurePlanned feature for upcoming language revision.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions