v icon indicating copy to clipboard operation
v copied to clipboard

Inter-operable with Python

Open evan0greenup opened this issue 1 year ago • 1 comments

Describe the feature

For Rust programming language, there is a PyO3. It can implement Python modules in Rust. It would be nice to make a library for V language, which can build Python package from V source code.

Use Case

If Python modules can be written in V lang, it would be good for both abstraction and performance.

Proposed Solution

There is C extension interface for Python. https://docs.python.org/3/extending/extending.html

C is intermediate representation of V language. Add some procedures to provide some extra modification on generated C files which satisfy the standard of Python extension would works.

Other Information

No response

Acknowledgements

  • [x] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

Version used

latest

Environment details (OS name and version, etc.)

Linux 6.2

evan0greenup avatar Apr 23 '23 06:04 evan0greenup

Here's an example someone was working on... https://github.com/mvenditto/v-python

JalonSolov avatar Apr 23 '23 11:04 JalonSolov