v
v copied to clipboard
Inter-operable with Python
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
Here's an example someone was working on... https://github.com/mvenditto/v-python