Skip to content

Question: Can we use php ffi to access rust libs? #548

@aszenz

Description

@aszenz

Description

Description

Since php 7.4 , we have the ffi extension which allows for interoperability with dynamic c libs, so there is less need to install extensions.

Rust libs can be packaged as dynamic c libs using cbindgen, so my question is can this lib also support packaging rust libs as PHP FFI pkgs.

A PHP FFI pkg needs two things:

  • C ABI compatible dynamic lib .so/.dll
  • PHP boilerplate for converting datatypes

Examples of PHP FFI pkgs:

Examples of such rust libs are

  • PyO3 for python
  • JNI for Java

Repository

No response

I have already tried

  • Searching the documentation and guide
  • Searching existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions