-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
379809f
commit 9108afa
Showing
15 changed files
with
129 additions
and
186 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,15 @@ | ||
APP = collections | ||
include ../*.mk | ||
|
||
.PHONY: all motoko rust build perf | ||
all: build perf | ||
|
||
motoko: | ||
set -e; \ | ||
cd motoko; \ | ||
envsubst < mops.template.toml > mops.toml; \ | ||
mops install; \ | ||
dfx canister create --all; \ | ||
dfx ledger fabricate-cycles --t 100 --canister $$(dfx identity get-wallet); \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
rm mops.toml; \ | ||
cd .. | ||
$(call build_with_mops,motoko) | ||
|
||
rust: | ||
set -e; \ | ||
cd rust; \ | ||
dfx canister create --all; \ | ||
dfx ledger fabricate-cycles --t 100 --canister $$(dfx identity get-wallet); \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,rust) | ||
|
||
build: motoko rust | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/perf.sh | ||
$(call perf,collections,perf.sh) |
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,34 +1,15 @@ | ||
APP = crypto | ||
include ../*.mk | ||
|
||
.PHONY: all motoko rust build perf | ||
all: build perf | ||
|
||
motoko: | ||
set -e; \ | ||
cd motoko; \ | ||
envsubst < mops.template.toml > mops.toml; \ | ||
mops install; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
rm mops.toml; \ | ||
cd .. | ||
$(call build_with_mops,motoko) | ||
|
||
rust: | ||
set -e; \ | ||
cd rust; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,rust) | ||
|
||
build: motoko rust | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/perf.sh | ||
$(call perf,crypto,perf.sh) |
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,30 +1,15 @@ | ||
APP = dapps | ||
include ../*.mk | ||
|
||
.PHONY: all motoko rust build perf | ||
all: build perf | ||
|
||
motoko: | ||
cd motoko; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,motoko) | ||
|
||
rust: | ||
cd rust; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,rust) | ||
|
||
build: motoko rust | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/basic_dao.sh; \ | ||
ic-repl ../../$(APP)/nft.sh | ||
$(call perf_two,dapps,basic_dao.sh,nft.sh) |
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,32 +1,15 @@ | ||
APP = heartbeat | ||
include ../*.mk | ||
|
||
.PHONY: all motoko rust build perf | ||
all: build perf | ||
|
||
motoko: | ||
cd motoko; \ | ||
envsubst < mops.template.toml > mops.toml; \ | ||
mops install; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
rm mops.toml; \ | ||
cd .. | ||
$(call build_with_mops,motoko) | ||
|
||
rust: | ||
cd rust; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,rust) | ||
|
||
build: motoko rust | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/perf.sh | ||
$(call perf,heartbeat,perf.sh) |
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,25 +1,10 @@ | ||
APP = motoko | ||
include ../*.mk | ||
|
||
.PHONY: all build perf | ||
all: build perf | ||
|
||
build: | ||
envsubst < mops.template.toml > mops.toml; \ | ||
mops install; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
rm mops.toml; \ | ||
cd .. | ||
$(call build_with_mops,motoko) | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/gc.sh; \ | ||
ic-repl ../../$(APP)/classes.sh | ||
|
||
clean: | ||
rm *.wasm && rm mops.toml | ||
$(call perf_two,motoko,gc.sh,classes.sh) |
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 was deleted.
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
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"canisters": { | ||
"classes": { | ||
"type": "motoko", | ||
"main": "src/Map.mo" | ||
}, | ||
"default": { | ||
"type": "custom", | ||
"candid": "../../collections/rust/collection.did", | ||
"wasm": "default.wasm", | ||
"build": [ | ||
"sh -c '$(dfx cache show)/moc ../../collections/motoko/src/triemap.mo -o default.wasm --public-metadata candid:service $(mops sources)'" | ||
] | ||
}, | ||
"copying": { | ||
"type": "custom", | ||
"candid": "../../collections/rust/collection.did", | ||
"wasm": "copying.wasm", | ||
"build": [ | ||
"sh -c '$(dfx cache show)/moc ../../collections/motoko/src/triemap.mo -o copying.wasm --public-metadata candid:service $(mops sources) --force-gc --copying-gc'" | ||
] | ||
}, | ||
"compacting": { | ||
"type": "custom", | ||
"candid": "../../collections/rust/collection.did", | ||
"wasm": "compacting.wasm", | ||
"build": [ | ||
"sh -c '$(dfx cache show)/moc ../../collections/motoko/src/triemap.mo -o compacting.wasm --public-metadata candid:service $(mops sources) --force-gc --compacting-gc'" | ||
] | ||
}, | ||
"generational": { | ||
"type": "custom", | ||
"candid": "../../collections/rust/collection.did", | ||
"wasm": "generational.wasm", | ||
"build": [ | ||
"sh -c '$(dfx cache show)/moc ../../collections/motoko/src/triemap.mo -o generational.wasm --public-metadata candid:service $(mops sources) --force-gc --generational-gc'" | ||
] | ||
}, | ||
"incremental": { | ||
"type": "custom", | ||
"candid": "../../collections/rust/collection.did", | ||
"wasm": "incremental.wasm", | ||
"build": [ | ||
"sh -c '$(dfx cache show)/moc ../../collections/motoko/src/triemap.mo -o incremental.wasm --public-metadata candid:service $(mops sources) --force-gc --incremental-gc'" | ||
] | ||
} | ||
}, | ||
"defaults": { | ||
"build": { | ||
"packtool": "mops sources", | ||
"args": "" | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,30 +1,15 @@ | ||
APP = pub-sub | ||
include ../*.mk | ||
|
||
.PHONY: all motoko rust build perf | ||
all: build perf | ||
|
||
motoko: | ||
cd motoko; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,motoko) | ||
|
||
rust: | ||
cd rust; \ | ||
dfx canister create --all; \ | ||
dfx build; \ | ||
echo "Optimize with ic-wasm level 3"; \ | ||
for f in .dfx/local/canisters/*/*.wasm; do ic-wasm -o $$f $$f shrink --optimize O3 --keep-name-section; done; \ | ||
cd .. | ||
$(call build,rust) | ||
|
||
build: motoko rust | ||
|
||
perf: | ||
set -e; \ | ||
mkdir -p ../_out/$(APP); \ | ||
cp README.md ../_out/$(APP); \ | ||
cd ../_out/$(APP); \ | ||
ic-repl ../../$(APP)/motoko/perf.sh; \ | ||
ic-repl ../../$(APP)/rust/perf.sh | ||
$(call perf_two,pub-sub,motoko/perf.sh,rust/perf.sh) |
Oops, something went wrong.