But I thought this is best on a clean thread.
The work has split into two PRs, on the Pretext and Runestone sides respectively. At a high level this aims two things: clarify the datafile interface a bit, and add support for binary files.
- The PreTeXt side is pretext #3139 (
https://github.com/PreTeXtBook/pretext/pull/3139): a new #file element to take the place of #datafile. @format (pre/image/binary) names the kind of file, and @user-interaction (none/view/edit) controls visibility. #datafile stays valid but is auto-converted in the preprocessor (@editable="yes"→edit, @hide="yes"→none, else view), so existing books shouldn't notice. The main new thing is first-class support for binary files — a compiled .jar or .zip — which was some of the impetus for this work.
- The Runestone side is rs #1361 (
https://github.com/RunestoneInteractive/rs/pull/1361), where binary files actually come alive. A binary file is stored base64 in source_code with an is_binary flag, and when a server-side program runs it gets handed to Jobe verbatim so any language can read it from the working directory. Programs can also reference a file on another page, and @compile-also now means different things per language: text sources compile together, a Java/Kotlin .jar goes on the classpath, a C/C++ .o/.a goes on the link line, and interpreted languages just read the delivered file.
Known limitations (C/C++ .so, in-browser runtimes) are noted in the PRs — happy to hear any thoughts before this moves further.
Developed with heavy assistance from opencode + deepseek v4 flash.
Haris
Charilaos Skiadas
Department of Mathematics
Hanover College