3 ms·
The manifest format could perhaps be less terse. It's really hard to guess what this actually means without reading the docs: "memory": { "max": 5 } P
by pavlov 4y ago
The manifest format could perhaps be less terse. It's really hard to guess what this actually means without reading the docs:
"memory": {
"max": 5
}
Presumably the maximum amount of memory available to the plugin, but which unit? 5 megabytes?
Turns out it's measured in pages of 64k each: "The units here are pages where a page is 64Kib." [1]
So max==5 apparently means a hard upper limit of 320 kB. (For when you want to run a 1984 copy of WordPerfect as a plugin, of course.)
Maybe a "max_MB" property might be more useful to plugin authors, and then just calculate the # of pages internally from that?
[1] https://extism.org/docs/concepts/manifest#schema https://extism.org/docs/concepts/manifest#schema
- bhelx 4y agoWe have an explanation of the manifest here: https://extism.org/docs/concepts/manifest https://extism.org/docs/concepts/manifest it's still a work in progress. the point about units is a good one. Might be a way to make that more clear.
- bhelx 4y ago> Maybe a "max_MB" property might be more useful to plugin authors, and then just calculate the # of pages internally from that? yeah, that's something to consider. You can only pass in parameters that are a multiple of the page size so that may not be an accurate representation. I do think we need to hint at the unit in the name though.