Skip to content

Simple extern FFI #63

Description

@rurban

See https://github.com/perl11/potion/wiki/FFI and p2 branch ffi

  • calling convention with different ABI (syntax and code, no win64, no stdcall yet)
  • either precompile each ffi proto to a signature translation wrapper, or translate the sigs at the call ext part in the vm, similar to filling in defaults.
  • return type declaration syntax. like an optional extern int sleep(sec=N).
    or extern sleep(sec=N) => N
  • call it (vm and jit)
  • move some of compile-time parts to the VM (OP_EXTERN dlsym). currently we can only call into already loaded libs, or load a lib at compile-time (as in p2 BEGIN{})

aggregate types and header parser later

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions