-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently the SDK only accepts file paths for workload execution. It would be useful to support passing code directly as a string.
Current behavior:
result = await sandbox.run('guest-examples/hello.js') # File path onlyProposed enhancement:
Add support for passing code as a string, with options:
Option 1: Separate method
result = await sandbox.run_code('console.log("hello")', language='javascript')Option 2: Auto-detect (file path vs code string)
result = await sandbox.run('console.log("hello")') # Detects as code
result = await sandbox.run('hello.js') # Detects as file pathImplementation notes:
- Nanvix runtime currently requires files
- Could create temporary files internally from code strings
- Need to handle cleanup of temporary files
- Should work across all language bindings (NAPI, Python)
Related to PR #20 review from @jsturtevant
Metadata
Metadata
Assignees
Labels
No labels