Support u128/i128 in runtime interface (#4703)

* Support `u128`/`i128` in runtime interface

This implements support for `u128`/`i128` as parameters/return value in
runtime interfaces. As we can not pass them as identity, as for the
other primitives types, we pass them as an pointer to an `[u8; 16]` array.

* Remove some unsafe code usage
This commit is contained in:
Bastian Köcher
2020-01-22 12:17:52 +01:00
committed by GitHub
parent c1750c5c28
commit 07d738ea3e
4 changed files with 80 additions and 0 deletions
@@ -108,3 +108,8 @@ fn test_invalid_utf8_data_should_return_an_error() {
fn test_overwrite_native_function_implementation() {
call_wasm_method::<HostFunctions>("test_overwrite_native_function_implementation");
}
#[test]
fn test_u128_i128_as_parameter_and_return_value() {
call_wasm_method::<HostFunctions>("test_u128_i128_as_parameter_and_return_value");
}