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

Expose intrinsics as decorated Python functions instead #20874

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stuhood
Copy link
Sponsor Member

@stuhood stuhood commented May 6, 2024

Remove intrinsics facility from the engine, and instead expose intrinsics in intrinsics.py via a new native call response for generators. This solves an issue in #19730 that there were no obvious @rule functions to call for intrinsics.

The native call response wraps a Rust future, which we trampoline to execute on the Rust runtime, and then return a value to the generator. It should work generically for any use case where we would like @rule code to await native code, which opens the door to fixing #11329 by making Workspace.write_digest async.

@stuhood stuhood added the category:internal CI, fixes for not-yet-released features, etc. label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:internal CI, fixes for not-yet-released features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant