Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper version of split_jobs that calls C functions #11

Open
LivInTheLookingGlass opened this issue May 3, 2021 · 1 comment
Open
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@LivInTheLookingGlass
Copy link
Owner

Potential API could be:

def run_cjobs(job_name, *args, converters=()): ...

job_name would be the name of the C function, and possibly also its file. converters would be a list of functions to convert the given Python object to a cffi object or similar.

This would probably be easiest with cython, but I don't, as of yet, know how.

If this does work, a similar API should be provided for other languages that can interact with Python or be called from C. I know you can do go, and I'm fairly sure rust would work if C does

@LivInTheLookingGlass LivInTheLookingGlass added enhancement New feature or request help wanted Extra attention is needed labels May 3, 2021
@LivInTheLookingGlass LivInTheLookingGlass modified the milestones: 1.0.0, 1.1.0 May 3, 2021
@LivInTheLookingGlass
Copy link
Owner Author

I think I have something similar to this working in the cython branch. It's not quite the same, and it would have problems if you needed to include any .c files, but it's at least partial support.

Full support would need to build an actual C extension, either using Cython or the standard C API. This is a good first step, though. If I can find a way to compile at runtime with a .c file, then that would be the way to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant