Implement JavaScript and Python Execution Components

This PR adds JavaScript and Python run-time features to the golem:exec interface as requested in issues document. Closes #33

/claim https://github.com/golemcloud/golem-llm/issues/33

What’s Done

Language Support:

  • JavaScript: ES5 through ES2022
  • Python: versions 3.8 through 3.12

Key Features:

  • Streaming execution - get output as code runs, not just when finished
  • Session management - upload files, run code, download result
  • Resource limits - enable timeouts and memory limits
  • File handling - UTF-8, Base64, and Hex encoding enabled
  • Error handling - short error messages for different failure modes

How It Works

  1. Upload your code files to a session
  2. Set the execution limits (timeout, memory)
  3. Run code with streaming or normal execution
  4. Return results through stdout, stderr, and exit codes

Testing

  • Tests cover streaming, timeouts, file operation, and language checks
  • Works in both native and WASM modes
  • Integration tests check the end-to-end pipeline

Files Changed

New Components:

  • exec/exec/ - Central executor (1,200+ lines)
  • exec/exec-javascript/ - JavaScript context (400+ lines)
  • exec/exec-python/ - Python context (400+ lines)

Key Files:

  • executor.rs - Core execution logic
  • runtime/ - Runtime factories for each language
  • stream.rs - Streaming output handling
  • WIT files defining the interfaces

Claim

Total prize pool $2,500
Total paid $0
Status Pending
Submitted July 07, 2025
Last updated July 07, 2025

Contributors

HE

Helmy LuqmanulHakim

@elskow

100%

Sponsors

GO

Golem Cloud

@golemcloud

$2,500