View Single Post
Old 07-20-2025, 12:07 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,804
Karma: 6000000
Join Date: Nov 2009
Device: many
They are not recognized media file types according to the epub 3.3 spec. You may be able to "hide" them in the METAINF folder but not sure. WebAssembly files do not run with every browser.

Since they are binary data files that are only opened by javascript, perhaps including their data directly into the js file might be best for that. According to a web search you can do that by encoding the Wasm binary as a base64 string and then decoding it within the JavaScript code.

The epub 3.4 spec is currently working on this, and may add support for webassembly .wasm files.

Hard to follow but I found this:

https://w3c.github.io/pm-wg/minutes/...2-27.html#d6c2


The epub 3.4 spec is the one that is proposing allowing pure html as well. It will be a few months before it gets approved one way or the other.

Here is a quote from the draft epub 3.4 spec:

Quote:
In addition to the content-specific exemptions, a resource is classified as an exempt resource if:

it is not referenced from a spine itemref element (i.e., used as a foreign content document); and

it is not directly rendered in its native format in an EPUB content document.

This exemption allows EPUB creators to include resources in the EPUB container that are not for use by EPUB reading systems. Resources that benefit from this exemption include:

script code modules, such as WebAssembly [wasm-core-2];
script inputs, such as fetched [fetch] data or images (refer to 6.3.2.5 Scripting fallbacks for restrictions on dynamically adding such resources to EPUB content documents);
data files for use by external applications (e.g., a scientific journal might include a data set with instructions on how to extract it from the EPUB container).
The spec did not say what this exemption means for inclusion in the OPF manifest, but my guess is it would be required. It just means that those files will not require fallback resources once the epub 3.4 spec gets approved sometime in the future.

Once whatever form of epub 3.4 spec gets finally approved, then a future version of Sigil will add them to its recognized media types list. But it may take awhile until epubcheck allows them. That also means most publishers will not currently allow them.

Last edited by KevinH; 07-20-2025 at 12:46 PM.
KevinH is offline   Reply With Quote