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: README.md
+10-8Lines changed: 10 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,6 @@ This project is a normal Rust library project, so we will assume you have instal
28
28
29
29
The package source code, we will implement the `Guest` trait, which contains the FDW logic, in this file.
30
30
31
-
- src/bindings.rs
32
-
33
-
Wasm package bindings file which is generated by the Component Model, we don't need to change it.
34
-
35
31
- supabase-wrappers-wit/
36
32
37
33
The [Wasm Interface Type](https://github.com/bytecodealliance/wit-bindgen) (WIT) provided by Supabase, it defines the interfaces between the Wasm FDW (guest) and the Wasm runtime (host). For example, the `http.wit` defines the HTTP related types and functions can be used in the guest, and the `routines.wit` defines the functions the guest needs to implement.
@@ -86,7 +82,7 @@ This will build the Wasm file in `target/wasm32-unknown-unknown/release/wasm_fdw
86
82
87
83
## Use this example foreign data wrapper on Supabase platform
88
84
89
-
To use our own Wasm FDW on Supabase platform, make sure the Wrappers extension version is `>=0.4.2`. Go to `SQL Editor` in Supabase Studio and run below query to check its version:
85
+
To use our own Wasm FDW on Supabase platform, make sure the Wrappers extension version is `>=0.4.1`. Go to `SQL Editor` in Supabase Studio and run below query to check its version:
90
86
91
87
```sql
92
88
SELECT*FROM pg_available_extension_versions WHERE name ='wrappers';
@@ -102,16 +98,18 @@ create foreign data wrapper wasm_wrapper
102
98
validator wasm_fdw_validator;
103
99
```
104
100
105
-
Create foreign server and foreign table:
101
+
Create foreign server and foreign table like below,
If you host the project source code on GitHub, the building and release process can be automated, take a look at the `.github/workflow/release_wasm_fdw.yml` file to see an example.
193
+
192
194
## More Wasm foreign data wrapper projects
193
195
194
196
There are some other Wasm foreign data wrapper projects developed by Supabase team, you can check them out to see more examples.
0 commit comments