-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move fastn_ds::wasm::Store to fastn_wasm::Store
- Loading branch information
1 parent
da6a32e
commit 0df9716
Showing
18 changed files
with
1,966 additions
and
87 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
pub async fn get_request( | ||
mut caller: wasmtime::Caller<'_, fastn_ds::wasm::Store>, | ||
mut caller: wasmtime::Caller<'_, fastn_wasm::Store>, | ||
) -> wasmtime::Result<i32> { | ||
let req = caller.data().to_http(); | ||
fastn_wasm::helpers::send_json(req, &mut caller).await | ||
} | ||
|
||
impl fastn_ds::wasm::Store { | ||
pub fn to_http(&self) -> ft_sys_shared::Request { | ||
self.req.clone() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
pub async fn send_response( | ||
mut caller: wasmtime::Caller<'_, fastn_ds::wasm::Store>, | ||
mut caller: wasmtime::Caller<'_, fastn_wasm::Store>, | ||
ptr: i32, | ||
len: i32, | ||
) -> wasmtime::Result<()> { | ||
let r = fastn_wasm::helpers::get_json(ptr, len, &mut caller)?; | ||
caller.data_mut().store_response(r); | ||
Ok(()) | ||
} | ||
|
||
impl fastn_ds::wasm::Store { | ||
pub fn store_response(&mut self, r: ft_sys_shared::Request) { | ||
self.response = Some(r); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.