Files
marqdo/lib/foreign.mq.md
T
cflmyandCursor fecaacd5be docs(lib): narrate remaining stdlib modules (M2)
Add module intros and per-function purpose lines across EN/ZH libs, with
callable examples on the smaller modules; keep + params and host bodies intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-14 11:47:35 +08:00

40 lines
727 B
Markdown

---
title: lib/foreign
description: Run bound code fences and inline sources via local interpreters
---
Run bound code fences and inline sources via local interpreters.
## set_cmd
+ `lang`
+ `cmd`
Bind interpreter command cmd for language lang.
*> host_foreign_set_cmd lang=`lang` cmd=`cmd`*
## run
+ `code`
+ `stdin`=None
Run a bound code fence value; optional stdin.
Caller: [foreign.run] code=`block`
*> host_foreign_run code=`code` stdin=`stdin`*
## run_lang
+ `lang`
+ `source`
+ `stdin`=None
Run source text with language lang; optional stdin.
*> host_foreign_run_lang lang=`lang` source=`source` stdin=`stdin`*
## langs
List configured foreign languages.
*> host_foreign_langs*