# wasm_exec_result

{% dynamic setvar source_file "src/main/java/com/google/devtools/build/lib/bazel/repository/starlark/StarlarkWasmExecutionResult.java" %} {% dynamic setvar version "8.4.0" %} {% dynamic setvar original_path "/rules/lib/builtins/wasm_exec_result" %} {% include "_buttons.html" %} 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
- output
- return_code

## error_message

    string wasm_exec_result.error_message

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

## output

    string wasm_exec_result.output

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

## return_code

    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.