Move to the new sdk (#8)

This commit is contained in:
vms
2020-07-11 23:04:55 +03:00
committed by GitHub
parent 37ce9dafb3
commit e9ef12b6b4
33 changed files with 311 additions and 631 deletions

View File

@ -16,6 +16,7 @@
use super::IType;
use fluence_sdk_wit::ParsedType;
use fluence_sdk_wit::WasmType;
pub(crate) fn ptype_to_itype(pty: &ParsedType) -> IType {
match pty {
@ -35,3 +36,12 @@ pub(crate) fn ptype_to_itype(pty: &ParsedType) -> IType {
ParsedType::Record(_) => unimplemented!(),
}
}
pub(crate) fn wtype_to_itype(pty: &WasmType) -> IType {
match pty {
WasmType::I32 => IType::I32,
WasmType::I64 => IType::I64,
WasmType::F32 => IType::F32,
WasmType::F64 => IType::F64,
}
}