forked from arakoodev/EdgeChains
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (38 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
.PHONY: all
all: build-cli
add:
@echo "Adding wasm32-wasi target"
@rustup target add wasm32-wasi
clean-rm: clean-shims
@rm -rf target/
clean:
@cargo clean
clean-shims:
@rm -rf dist/ node_modules/
build-arakoo:
@echo "Building arakoo"
@cargo build -p serve -r
build-cli: build-engine
@echo "Building javy cli"
@CARGO_PROFILE_RELEASE_LTO=off cargo build -p cli -r
build-engine: build-shims
@echo "Building arakoo engine"
@cargo build -p arakoo-js-engine --target=wasm32-wasi -r
build-shims: shims-install
@echo "Building shims"
@cd JS/wasm/crates/arakoo-core/src/apis/http/shims && npm run build
shims-install:
@echo "Installing deps of shims"
@cd JS/wasm/crates/arakoo-core/src/apis/http/shims && npm install
compile: build-example
./target/release/javy compile JS/wasm/examples/ec-wasmjs-hono/bin/app.js
serve:
./target/release/arakoo index.wasm
build-example:
@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/
build-jsonnet:
@cd JS/jsonnet && ./build.sh && npm version $(TAG)
build-edgechains:
@cp README.md JS/edgechains/arakoodev && cd JS/edgechains/arakoodev && npm install && npm run build && npm version $(TAG) && rm -rf src/