Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0a33
0.1.0a34
8 changes: 4 additions & 4 deletions packages/polywrap-client/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/polywrap-uri-resolvers/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 24 additions & 46 deletions packages/polywrap-wasm/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions packages/polywrap-wasm/polywrap_wasm/imports/abort.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,7 @@ def wrap_abort(
file_len,
)

if (
self.state.subinvoke_result
and self.state.subinvoke_result.error
and msg == repr(self.state.subinvoke_result.error)
):
if self.state.subinvoke_result and self.state.subinvoke_result.error:
# If the error thrown by Wasm module is the same as the subinvoke error,
# then we can notify the subinvoke error was cause of the Wasm module abort.
raise WrapAbortError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def wrap_get_implementations(self, uri_ptr: int, uri_len: int) -> bool:
message="Expected invoker to be defined got None",
)
try:
maybe_implementations = self.invoker.get_implementations(uri=uri)
maybe_implementations = self.invoker.get_implementations(uri, False)
implementations: List[str] = (
[uri.uri for uri in maybe_implementations]
if maybe_implementations
Expand Down
17 changes: 13 additions & 4 deletions packages/polywrap-wasm/polywrap_wasm/wasm_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,19 @@ def invoke(
)

encoded_args = (
state.invoke_options.args
if isinstance(state.invoke_options.args, bytes)
else msgpack_encode(state.invoke_options.args)
(
state.invoke_options.args
if isinstance(state.invoke_options.args, bytes)
else msgpack_encode(state.invoke_options.args)
)
if state.invoke_options.args
else b""
)
encoded_env = (
msgpack_encode(state.invoke_options.env)
if state.invoke_options.env
else b""
)
encoded_env = msgpack_encode(state.invoke_options.env)

method_length = len(state.invoke_options.method)
args_length = len(encoded_args)
Expand All @@ -149,6 +157,7 @@ def invoke(
instance = self.create_wasm_instance(store, state, client)

exports = WrapExports(instance, store)
print("env length", env_length)
result = exports.__wrap_invoke__(method_length, args_length, env_length)

if result and state.invoke_result and state.invoke_result.result:
Expand Down
17 changes: 7 additions & 10 deletions packages/polywrap-wasm/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"
wasmtime = "^6.0.0"
unsync = "^1.4.0"
unsync-stubs = "^0.1.2"
polywrap-msgpack = "^0.1.0a33"
polywrap-manifest = "^0.1.0a33"
polywrap-core = "^0.1.0a33"
[tool.poetry.dev-dependencies]
wasmtime = "^9.0.0"
polywrap-msgpack = {path = "../polywrap-msgpack", develop = true}
polywrap-manifest = {path = "../polywrap-manifest", develop = true}
polywrap-core = {path = "../polywrap-core", develop = true}

[tool.poetry.group.dev.dependencies]
pycln = "^2.1.3"
pytest = "^7.1.2"
pytest-asyncio = "^0.19.0"
pylint = "^2.15.4"
Expand All @@ -30,9 +30,6 @@ pyright = "^1.1.275"
pydocstyle = "^6.1.1"
pydantic = "^1.10.2"

[tool.poetry.group.dev.dependencies]
pycln = "^2.1.3"

[tool.bandit]
exclude_dirs = ["tests"]

Expand Down