You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/embed/go/reference/0.10.x.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1709,7 +1709,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1709
1709
1710
1710
3. Table instance
1711
1711
1712
-
In WasmEdge, developers can create the `Table` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1712
+
In WasmEdge, developers can create the `Table` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1713
1713
1714
1714
```go
1715
1715
lim:= wasmedge.NewLimitWithMax(10, 20)
@@ -1756,7 +1756,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1756
1756
1757
1757
4. Memory instance
1758
1758
1759
-
In WasmEdge, developers can create the `Memory` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1759
+
In WasmEdge, developers can create the `Memory` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1760
1760
1761
1761
```go
1762
1762
lim:= wasmedge.NewLimitWithMax(1, 5)
@@ -1796,7 +1796,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1796
1796
1797
1797
5. Global instance
1798
1798
1799
-
In WasmEdge, developers can create the `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1799
+
In WasmEdge, developers can create the `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1800
1800
1801
1801
```go
1802
1802
// Create the global type with value type and mutation.
@@ -1827,7 +1827,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1827
1827
1828
1828
### Host Functions
1829
1829
1830
-
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge-go, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`.
1830
+
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`.
1831
1831
1832
1832
1. Host function allocation
1833
1833
@@ -2162,7 +2162,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
2162
2162
vardataint32 = 0
2163
2163
2164
2164
// Create the module instance with the module name "extern".
2165
-
impmod:= wasmedge.NewImportObject("extern")
2165
+
modinst:= wasmedge.NewModule("extern")
2166
2166
2167
2167
// Create and add a function instance into the module instance with export name "func-add".
2168
2168
functype:= wasmedge.NewFunctionType(
@@ -2171,10 +2171,10 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
Copy file name to clipboardExpand all lines: docs/embed/go/reference/0.11.x.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1735,7 +1735,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1735
1735
1736
1736
3. Table instance
1737
1737
1738
-
In WasmEdge, developers can create the `Table` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1738
+
In WasmEdge, developers can create the `Table` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1739
1739
1740
1740
```go
1741
1741
lim:= wasmedge.NewLimitWithMax(10, 20)
@@ -1782,7 +1782,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1782
1782
1783
1783
4. Memory instance
1784
1784
1785
-
In WasmEdge, developers can create the `Memory` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1785
+
In WasmEdge, developers can create the `Memory` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1786
1786
1787
1787
```go
1788
1788
lim:= wasmedge.NewLimitWithMax(1, 5)
@@ -1822,7 +1822,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1822
1822
1823
1823
5. Global instance
1824
1824
1825
-
In WasmEdge, developers can create the `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1825
+
In WasmEdge, developers can create the `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1826
1826
1827
1827
```go
1828
1828
// Create the global type with value type and mutation.
@@ -1853,7 +1853,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1853
1853
1854
1854
### Host Functions
1855
1855
1856
-
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge-go, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`.
1856
+
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`.
1857
1857
1858
1858
1. Host function allocation
1859
1859
@@ -2326,7 +2326,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
2326
2326
vardataint32 = 0
2327
2327
2328
2328
// Create the module instance with the module name "extern".
2329
-
impmod:= wasmedge.NewImportObject("extern")
2329
+
modinst:= wasmedge.NewModule("extern")
2330
2330
2331
2331
// Create and add a function instance into the module instance with export name "func-add".
2332
2332
functype:= wasmedge.NewFunctionType(
@@ -2335,10 +2335,10 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
Noticed that the `TensorFlow` and `Image` extensions are only for the `Linux` platforms. After installation, developers can use the `source` command to update the include and linking searching path.
@@ -78,7 +78,7 @@ Noticed that the `TensorFlow` and `Image` extensions are only for the `Linux` pl
78
78
After the WasmEdge installation, developers can get the `WasmEdge-go` package and build it in your Go project directory.
79
79
80
80
```bash
81
-
go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
81
+
go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
82
82
go build
83
83
```
84
84
@@ -760,7 +760,7 @@ The following shows the example of running the WASM for getting the Fibonacci. T
760
760
Then you can build and run the Golang application with the WasmEdge Golang SDK: (the 21 Fibonacci number is 17711 in 0-based index)
761
761
762
762
```bash
763
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
763
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
764
764
$ go build
765
765
$ ./wasmedge_test
766
766
Get fibonacci[21]: 17711
@@ -1069,7 +1069,7 @@ In WebAssembly, the instances in WASM modules can be exported and can be importe
1069
1069
Then you can build and run: (the 25th Fibonacci number is 121393 in 0-based index)
1070
1070
1071
1071
```bash
1072
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
1072
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
1073
1073
$ go build
1074
1074
$ ./wasmedge_test
1075
1075
Get fibonacci[25]: 121393
@@ -1119,7 +1119,7 @@ In WebAssembly, the instances in WASM modules can be exported and can be importe
1119
1119
Then you can build and run: (the 20th Fibonacci number is 10946 in 0-based index)
1120
1120
1121
1121
```bash
1122
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
1122
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
1123
1123
$ go build
1124
1124
$ ./wasmedge_test
1125
1125
Get the result: 10946
@@ -1186,7 +1186,7 @@ In WebAssembly, the instances in WASM modules can be exported and can be importe
1186
1186
Then you can build and run: (the 25th Fibonacci number is 121393 in 0-based index)
1187
1187
1188
1188
```bash
1189
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
1189
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
1190
1190
$ go build
1191
1191
$ ./wasmedge_test
1192
1192
Get the result: 121393
@@ -1284,7 +1284,7 @@ Sometimes the developers may have requirements to get the instances of the WASM
1284
1284
Then you can build and run: (the only exported function in `fibonacci.wasm` is `fib`)
1285
1285
1286
1286
```bash
1287
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
1287
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
1288
1288
$ go build
1289
1289
$ ./wasmedge_test
1290
1290
Exported functionname: fib
@@ -1448,7 +1448,7 @@ func main() {
1448
1448
Then you can build and run: (the 18th Fibonacci number is 1346269 in 30-based index)
1449
1449
1450
1450
```bash
1451
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
1451
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
1452
1452
$ go build
1453
1453
$ ./wasmedge_test
1454
1454
Exported functionname: fib
@@ -1726,7 +1726,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1726
1726
1727
1727
3. Table instance
1728
1728
1729
-
In WasmEdge, developers can create the `Table` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1729
+
In WasmEdge, developers can create the `Table` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Table` objects supply APIs to control the data in table instances.
1730
1730
1731
1731
```go
1732
1732
lim:= wasmedge.NewLimitWithMax(10, 20)
@@ -1773,7 +1773,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1773
1773
1774
1774
4. Memory instance
1775
1775
1776
-
In WasmEdge, developers can create the `Memory` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1776
+
In WasmEdge, developers can create the `Memory` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Memory` objects supply APIs to control the data in memory instances.
1777
1777
1778
1778
```go
1779
1779
lim:= wasmedge.NewLimitWithMax(1, 5)
@@ -1813,7 +1813,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1813
1813
1814
1814
5. Global instance
1815
1815
1816
-
In WasmEdge, developers can create the `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1816
+
In WasmEdge, developers can create the `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`. The `Global` objects supply APIs to control the value in global instances.
1817
1817
1818
1818
```go
1819
1819
// Create the global type with value type and mutation.
@@ -1844,7 +1844,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
1844
1844
1845
1845
### Host Functions
1846
1846
1847
-
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge-go, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `ImportObject` object for registering into a `VM` or a `Store`.
1847
+
[Host functions](https://webassembly.github.io/spec/core/exec/runtime.html#syntax-hostfunc) are functions outside WebAssembly and passed to WASM modules as imports. In WasmEdge, developers can create the `Function`, `Memory`, `Table`, and `Global` objects and add them into an `wasmedge.Module` object for registering into a `VM` or a `Store`.
1848
1848
1849
1849
1. Host function allocation
1850
1850
@@ -2029,7 +2029,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
2029
2029
Then you can build and run the Golang application with the WasmEdge Golang SDK:
2030
2030
2031
2031
```bash
2032
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
2032
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
2033
2033
$ go build
2034
2034
$ ./wasmedge_test
2035
2035
[2022-08-26 15:06:40.384] [error] user defined failed: user defined error code, Code: 0x15be
@@ -2220,7 +2220,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
2220
2220
Then you can build and run the Golang application with the WasmEdge Golang SDK:
2221
2221
2222
2222
```bash
2223
-
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.0
2223
+
$ go get github.com/second-state/WasmEdge-go/wasmedge@v0.12.1
2224
2224
$ go build
2225
2225
$ ./wasmedge_test
2226
2226
Get the result: 6912
@@ -2293,7 +2293,7 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
2293
2293
vardataint32 = 0
2294
2294
2295
2295
// Create the module instance with the module name "extern".
2296
-
impmod:= wasmedge.NewImportObject("extern")
2296
+
modinst:= wasmedge.NewModule("extern")
2297
2297
2298
2298
// Create and add a function instance into the module instance with export name "func-add".
2299
2299
functype:= wasmedge.NewFunctionType(
@@ -2302,10 +2302,10 @@ The instances are the runtime structures of WASM. Developers can retrieve the `M
0 commit comments