> ## Documentation Index
> Fetch the complete documentation index at: https://bazel-pr-30914.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# wasm_exec_result {#modules.wasm_exec_result}

The result of executing a WebAssembly function with
`repository_ctx.execute_wasm()`. It contains the function's
return value and output buffer.

If execution failed before the function returned then the return code will be negative
and the `error_message` field will be set.

## Members

* [error\_message](#error_message)
* [output](#output)
* [return\_code](#return_code)

<h2 id="error_message">
  error\_message
</h2>

```
string wasm_exec_result.error_message
```

Contains an error message if execution failed before the function returned.

<h2 id="output">
  output
</h2>

```
string wasm_exec_result.output
```

The content of the output buffer returned by the WebAssembly function.

<h2 id="return_code">
  return\_code
</h2>

```
long wasm_exec_result.return_code
```

The return value of the WebAssembly function, or a negative value if execution
was terminated before the function returned.
