feat: Improve usability of manifest types (#124)

- Adds some helper functions for creating a manifest, mostly helpful for
the Rust SDK
- Renames `ManifestWasm` to `Wasm`
- Renames `ManifestMemory` to `MemoryOptions`
- `ManifestWasm` and `ManifestMemory` have been marked as deprecated
- Adds an alias from `MemoryOptions::max_pages` to `MemoryOptions::max`
in serde specification

Co-authored-by: Steve Manuel <steve@dylib.so>
This commit is contained in:
zach
2022-12-05 15:09:50 -08:00
committed by GitHub
parent a3c6b9ee6a
commit 9cf54d5f1f
11 changed files with 152 additions and 61 deletions

View File

@@ -66,7 +66,7 @@ class TestExtism(unittest.TestCase):
def _manifest(self):
wasm = self._count_vowels_wasm()
hash = hashlib.sha256(wasm).hexdigest()
return {"wasm": [{"data": wasm, "hash": hash}], "memory": {"max": 5}}
return {"wasm": [{"data": wasm, "hash": hash}], "memory": {"max_pages": 5}}
def _count_vowels_wasm(self):
path = join(dirname(__file__), "code.wasm")