Skip to content

Commit

Permalink
Update REDME code
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaGiorgadze committed Nov 7, 2023
1 parent 11cdbc7 commit 55d2d86
Showing 1 changed file with 42 additions and 42 deletions.
84 changes: 42 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,34 @@ func main() {
// ...

return m.Memory.WriteMultiPack(
m.Memory.WriteBytesPack([]byte("Some")),
m.Memory.WriteBytePack(1),
m.Memory.WriteUint32Pack(11),
m.Memory.WriteUint64Pack(2023),
m.Memory.WriteFloat32Pack(11.1),
m.Memory.WriteFloat64Pack(11.2023),
m.Memory.WriteStringPack("Host: Wasify."),
)
m.Memory.WriteBytesPack([]byte("Some")),
m.Memory.WriteBytePack(1),
m.Memory.WriteUint32Pack(11),
m.Memory.WriteUint64Pack(2023),
m.Memory.WriteFloat32Pack(11.1),
m.Memory.WriteFloat64Pack(11.2023),
m.Memory.WriteStringPack("Host: Wasify."),
)

},
Params: []wasify.ValueType{
wasify.ValueTypeBytes,
wasify.ValueTypeByte,
wasify.ValueTypeI32,
wasify.ValueTypeI64,
wasify.ValueTypeF32,
wasify.ValueTypeF64,
wasify.ValueTypeString,
},
Results: []wasify.ValueType{
wasify.ValueTypeBytes,
wasify.ValueTypeByte,
wasify.ValueTypeI32,
wasify.ValueTypeI64,
wasify.ValueTypeF32,
wasify.ValueTypeF64,
wasify.ValueTypeString,
},
wasify.ValueTypeBytes,
wasify.ValueTypeByte,
wasify.ValueTypeI32,
wasify.ValueTypeI64,
wasify.ValueTypeF32,
wasify.ValueTypeF64,
wasify.ValueTypeString,
},
Results: []wasify.ValueType{
wasify.ValueTypeBytes,
wasify.ValueTypeByte,
wasify.ValueTypeI32,
wasify.ValueTypeI64,
wasify.ValueTypeF32,
wasify.ValueTypeF64,
wasify.ValueTypeString,
},
},
},
})
Expand All @@ -99,33 +99,33 @@ func main() {
package main

import (
"github.com/wasify-io/wasify-go/mdk"
"github.com/wasify-io/wasify-go/mdk"
)

func main() {}

//go:wasmimport host_all_available_types hostTest
func hostTest(
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
mdk.PackedData,
) mdk.MultiPackedData

//export guestTest
func _guestTest() {
hostTest(
mdk.WriteBytesPack([]byte("Guest: Wello Wasify!")),
mdk.WriteBytePack(byte(1)),
mdk.WriteUint32Pack(uint32(11)),
mdk.WriteUint64Pack(uint64(2023)),
mdk.WriteFloat32Pack(float32(11.1)),
mdk.WriteFloat64Pack(float64(11.2023)),
mdk.WriteStringPack("Guest: Wasify."),
)
hostTest(
mdk.WriteBytesPack([]byte("Guest: Wello Wasify!")),
mdk.WriteBytePack(byte(1)),
mdk.WriteUint32Pack(uint32(11)),
mdk.WriteUint64Pack(uint64(2023)),
mdk.WriteFloat32Pack(float32(11.1)),
mdk.WriteFloat64Pack(float64(11.2023)),
mdk.WriteStringPack("Guest: Wasify."),
)
}

```
Expand Down

0 comments on commit 55d2d86

Please sign in to comment.