Skip to content

Feature request - native sandbox function call #424

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

Open
AsafFisher opened this issue Apr 20, 2025 · 2 comments
Open

Feature request - native sandbox function call #424

AsafFisher opened this issue Apr 20, 2025 · 2 comments
Labels
area/API Related to the API or public interface lifecycle/confirmed Bug is verified or proposal seems reasonable
Milestone

Comments

@AsafFisher
Copy link

I feel like making one binary that maps COW to both host and guest would be cool, that way the sandboxed function can be compiled to the same binary and a call to the function can be done in a native way without a string name but rather by:

#[sandboxed]
fn calculate(){}
guest.call(calculate)

How does that sound?

@github-actions github-actions bot added the lifecycle/needs-review The issue has not yet been reviewed. label Apr 20, 2025
@ludfjig
Copy link
Contributor

ludfjig commented Apr 22, 2025

Hello, I've also been thinking about something similar., and I think something like this could be awesome and definitely a cool proof of concept.

In addition to your suggestion, it might also be possible for the proc macro above function to write a new source file which can be compiled to a guest, and then also potentially compile the guest as well. Calling the function on the host side then transparently creates a new sandbox and calls into the code-generated guest.

@danbugs danbugs added lifecycle/confirmed Bug is verified or proposal seems reasonable and removed lifecycle/needs-review The issue has not yet been reviewed. labels Apr 23, 2025
@danbugs
Copy link
Contributor

danbugs commented Apr 23, 2025

Perhaps partially addressed by #376
cc: @syntactically

@danbugs danbugs added this to the Parked milestone Apr 23, 2025
@danbugs danbugs added the area/API Related to the API or public interface label Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/API Related to the API or public interface lifecycle/confirmed Bug is verified or proposal seems reasonable
Projects
Status: No status
Development

No branches or pull requests

3 participants