Closed Dexesttp closed 3 years ago
Oh, that's really great, thanks!
In Pandoc's "A note on security" section of the manual (link), there is a recommendation to set a heap size limit to prevent pathological corner cases. The option was however not available as of now via this crate.
The full list of "RTS" options can be found in the Haskell "Runtime control" section of the manual (link). The Runtime System options are way more extensive than the
-M
option, and cover a lot of use-cases that aren't needed while usingpandoc
in a production setting.
can you put the above comment as a doc comment on the RTS enum variant?
can you put the above comment as a doc comment on the RTS enum variant?
Done ! I also added the first lines of the example code above, to show how this option might be used (this passes correctly through cargo test --doc
).
Perfect, thanks!
Hello, and thanks a lot for this crate !
In Pandoc's "A note on security" section of the manual (link), there is a recommendation to set a heap size limit to prevent pathological corner cases. The option was however not available as of now via this crate.
The full list of "RTS" options can be found in the Haskell "Runtime control" section of the manual (link). The Runtime System options are way more extensive than the
-M
option, and cover a lot of use-cases that aren't needed while usingpandoc
in a production setting.To support both the
+RTS -M<size> -RTS
setting recommended by Pandoc, and to allow adding options to the runtime system in the future, this Pull Request adds :PandocOption::RuntimeSystem
enum entry, which takes a vector ofPandocRuntimeSystemOption
enum valuesPandocRuntimeSystemOption::MaximumHeapMemory
entry, which takes a string representing the maximum heap memory size to use.This way, the PandocRuntimeSystemOption enum can be extended as new parameters are supported.
Example code to use this feature :