Skip to content

Commit

Permalink
Update dependencies to version 0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul007-bit committed Mar 1, 2024
1 parent afc2856 commit 804f4d7
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 19 deletions.
4 changes: 2 additions & 2 deletions JS/edgechains/examples/hydeSearch/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion JS/edgechains/examples/hydeSearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"pg": "^8.11.3",
"reflect-metadata": "^0.1.13",
"tsc": "^2.0.4",
"@arakoodev/jsonnet": "file:./../../../wasm/types/jsonnet"
"@arakoodev/jsonnet": "0.1.2"
},
"devDependencies": {
"@arakoodev/edgechains.js": "^0.1.10",
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/react-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/jsonnet": "file:./../../../wasm/types/jsonnet",
"@arakoodev/jsonnet": "0.1.2",
"@hono/node-server": "^1.2.0",
"@types/dotenv": "^8.2.0",
"hono": "^3.9.2",
Expand Down
2 changes: 1 addition & 1 deletion JS/edgechains/examples/wikiExample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@arakoodev/jsonnet": "file:./../../../wasm/types/jsonnet",
"@arakoodev/jsonnet": "0.1.2",
"@hono/node-server": "^1.2.0",
"@types/dotenv": "^8.2.0",
"hono": "^3.9.2",
Expand Down
1 change: 0 additions & 1 deletion JS/wasm/crates/apis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ extern "C" {
fn fetch(request_pointer: *const u8, request_len: i32);
fn get_response_len() -> i32;
fn get_response(ptr: *mut u8);

}

pub(crate) trait JSApiSet {
Expand Down
9 changes: 9 additions & 0 deletions JS/wasm/crates/serve/src/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,15 @@ pub fn add_fetch_to_linker(linker: &mut Linker<WasiCtx>) -> anyhow::Result<()> {
},
)?;
// add the fetch_output_len and fetch_output functions here
linker.func_wrap("arakoo", "get_response_len", move || -> i32 {
todo!("get_response_len")
})?;

// also add the fetch_error_len and fetch_error functions here
linker.func_wrap(
"arakoo",
"get_response",
move |mut caller: Caller<'_, WasiCtx>, ptr: i32| todo!("get_response"),
)?;
Ok(())
}
16 changes: 9 additions & 7 deletions JS/wasm/examples/ec-wasmjs-hono/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion JS/wasm/examples/ec-wasmjs-hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "hono",
"type": "module",
"main": "bin/app.js",
"scripts": {
"build": "node ./build.js"
},
"devDependencies": {
"@planetscale/database": "^1.4.0",
"esbuild": "^0.19",
Expand All @@ -11,7 +14,7 @@
"@hono/node-server": "^1.3.1",
"axios": "^1.6.2",
"crypto": "^1.0.1",
"arakoo-jsonnet": "file:../../types/jsonnet",
"@arakoodev/jsonnet": "0.1.2",
"http": "^0.0.1-security",
"stream": "^0.0.2"
}
Expand Down
4 changes: 2 additions & 2 deletions JS/wasm/examples/ec-wasmjs-hono/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hono } from "hono";
import { connect } from "@planetscale/database";
import { html } from "hono/html";
import Jsonnet from "arakoo-jsonnet";

import Jsonnet from "@arakoodev/jsonnet";

let jsonnet = new Jsonnet();

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ shims-install:
@cd JS/wasm/crates/apis/src/http/shims && npm install

compile: build-example
./target/release/arakoo compile JS/wasm/examples/ec-wasmjs-hono/bin/app.js
./target/release/javy compile JS/wasm/examples/ec-wasmjs-hono/bin/app.js

serve:
./target/release/arakoo serve index.wasm
./target/release/arakoo index.wasm

build-example:
@cd /Users/rahulyadav/Documents/edgeCloud/EdgeChain/JS/wasm/examples/ec-wasmjs-hono && npm i && npm run build arakoo
@cd JS/wasm/examples/ec-wasmjs-hono && npm i && npm run build arakoo

clean-example:
@rm -r JS/wasm/examples/ec-wasmjs-hono/node_modules/ JS/wasm/examples/ec-wasmjs-hono/bin/
Expand Down

0 comments on commit 804f4d7

Please sign in to comment.