Releases: noppa/xmllint-wasm
v5.0.0-alpha Optimize file input and stdout output
Attempt to fix #20 by using two more performant Emscripten APIs, FS.writeFile
instead of Fs.createDataFile
+intArrayFromString
, and for output Module.print
instead of Module.stdout
.
I don't think this should be a breaking change, for most people at least, but I'm doing a major version bump anyway because I think maybe the createDataFile
vs writeFile
change could cause trouble if the input XML had some other encoding than utf-8. FS.writeFile
assumes utf-8 when the input is string.
TODO: We now also accept Buffer
in the XML file contents, which should be reflected in types. Also, more testing is needed before release, I haven't checked browser usage at all yet.
4.0.2
4.0.1
4.0.0
Add two new options, initialMemoryPages
and maxMemoryPages
, to control
how much memory the WebAssembly module allocates by default and is allowed
to allocate for the validation.
PR #16, fixes issue #8.
Thanks @MLSTRM!
The "breaking change" here is that we also raise the default maximum
memory cap from the old implicit 16MiB to double of that, 32MiB.
With this new default, you may not even need to use the maxMemoryPages
option
yourself, as 32MiB is probably already high enough for quite a lot of use cases.
In some very memory constrained environments, this raised limit could impose
a problem if it causes the main process to run out of memory, so that's why
I'm calling it a breaking change. For most applications, though, this should
not be a problem. You can opt into the old limit by setting
maxMemoryPages: 16 * xmllint.memoryPages.MiB,