Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various updates #2055

Merged
merged 6 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- if: contains(github.head_ref, 'release--')
name: Install dfx
run: |
DFXVM_INIT_YES=true DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFXVM_INIT_YES=true DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
# TODO we should use some Action-specific bot account
- if: contains(github.head_ref, 'release--')
Expand Down Expand Up @@ -352,7 +352,7 @@ jobs:
- if: ${{ needs.release-candidate-deploy.outputs.should_run_tests }}
name: Install dfx
run: |
DFXVM_INIT_YES=true DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFXVM_INIT_YES=true DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
echo "$HOME/.local/share/dfx/bin" >> $GITHUB_PATH
- if: ${{ needs.release-candidate-deploy.outputs.should_run_tests && matrix.os == 'macos-latest' }}
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd hello_world
You can create the hello_world HTTP Server example locally like this:

```bash
npx azle new hello_world --http-server
npx azle new hello_world --http-server --experimental
cd hello_world

# Now read the README.md
Expand Down
9 changes: 4 additions & 5 deletions contributing/wasmedge_quickjs.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
To develop locally you will need to do the following:

1. Set the `AZLE_WASMEDGE_QUICKJS_DIR` environment variable on deploy or test to the location of your locally cloned `wasmedge-quickjs`.

2. Change the `wasmedge_quickjs` dependency in `azle/src/compiler/rust/canister/Cargo.toml` to the location of your locally cloned `wasmedge-quickjs`.

3. When you are ready to commit your changes, make sure to update `azle/src/compiler/Dockerfile` with the new git commit hash of the `wasmedge-quickjs` repository. To use the new `Dockerfile` run `npx azle clean` and deploy with the `AZLE_USE_DOCKERFILE=true` environment variable
1. Clone https://github.com/demergent-labs/wasmedge-quickjs
2. Run `npm link` from the `wasmedge-quickjs` directory
3. Run `npm link wasmedge-quickjs` from the `azle` directory
4. Make sure to npm install from the correct commit hash of `wasmedge-quickjs` once you push your changes
2 changes: 1 addition & 1 deletion docs/404.html

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions docs/assets.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/authentication.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/azle.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/bitcoin.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/candid.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/candid_based_documentation.html

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions docs/candid_rpc.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/candid_rpc_or_http_server.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/canister_lifecycle.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/canisters_overview.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/caveats.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/cross_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/cycles.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/databases.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/debugging.html

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions docs/deployment.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/deployment_candid_based.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/ethereum.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/examples.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/fetch.html

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions docs/get_started.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/hello_world.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/http.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/http_server.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/installation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/internet_computer_overview.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/limitations.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/management_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/npm.html

Large diffs are not rendered by default.

116 changes: 49 additions & 67 deletions docs/print.html

Large diffs are not rendered by default.

54 changes: 35 additions & 19 deletions docs/project_structure.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/query_methods.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/bitcoin.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/accept_message.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/arg_data_raw.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call_apis.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call_raw.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call_raw128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call_with_payment.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/call_with_payment128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/caller.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/method_name.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_accept.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_accept128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_available.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_available128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_refunded.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/msg_cycles_refunded128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/notify.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/notify_raw.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/notify_with_payment_128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/reject.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/reject_code.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/reject_message.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/reply.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/call_apis/reply_raw.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/blob.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/bool.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/candid.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/empty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/float32.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/float64.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/func.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/int.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/int16.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/int32.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/int64.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/int8.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/nat.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/nat16.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/nat32.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/nat64.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/nat8.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/null.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/opt.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/principal.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/record.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/reserved.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/service.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/text.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/variant.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/candid/vec.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/candid_decode.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/candid_encode.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/canister_apis.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/canister_balance.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/canister_balance128.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/canister_id.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/canister_version.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/data_certificate.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/instruction_counter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/is_controller.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/performance_counter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/print.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/set_certified_data.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/time.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_apis/trap.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/canister_methods.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/heartbeat.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/http_request.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/http_request_update.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/init.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/inspect_message.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/post_upgrade.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/pre_upgrade.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/query.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/canister_methods/update.html

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions docs/reference/environment_variables.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/bitcoin_get_utxos.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/canister_status.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/create_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/delete_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/deposit_cycles.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/ecdsa_public_key.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/http_request.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/install_code.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/raw_rand.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/sign_with_ecdsa.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/start_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/stop_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/uninstall_code.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/management_canister/update_settings.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/plugins.html

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions docs/reference/reference.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/stable_memory/stable_memory.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/stable_memory/stable_structures.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/timers/clear_timer.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/timers/set_timer.html

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions docs/reference/timers/set_timer_interval.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference/timers/timers.html

Large diffs are not rendered by default.

210 changes: 0 additions & 210 deletions docs/reference/wasm_binary_optimization.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/reference_http/autoreload.html

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions docs/reference_http/environment_variables.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/reference_http/reference.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/rest_based_examples.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/servers.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/stable_structures.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/the_azle_book.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/timers.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/tokens.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/update_methods.html

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions examples/hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand All @@ -66,11 +66,6 @@ cd hello_world
npm install
```

```bash
# install the azle dfx extension
npx azle install-dfx-extension
```

```bash
# start up a local ICP replica
dfx start --clean
Expand Down
9 changes: 2 additions & 7 deletions examples/hello_world_http_server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand All @@ -57,7 +57,7 @@ To create and deploy a simple sample application called `hello_world`:

```bash
# create a new default project called hello_world
npx azle new hello_world --http-server
npx azle new hello_world --http-server --experimental
cd hello_world
```

Expand All @@ -66,11 +66,6 @@ cd hello_world
npm install
```

```bash
# install the azle dfx extension
npx azle install-dfx-extension
```

```bash
# start up a local ICP replica
dfx start --clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function getTests(managementCanister: ActorSubclass<_SERVICE>) {
expect(canisterStatus.status).toStrictEqual({
running: null
});
expect(canisterStatus.memory_size).toBe(654n);
expect(canisterStatus.memory_size).toBe(702n);
expect(canisterStatus.cycles).toBeGreaterThanOrEqual(
800_000_000_000n
);
Expand Down
2 changes: 1 addition & 1 deletion tests/property/ic_api/time/test/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function getInspectMessageTime(actor: Actor): Promise<bigint> {
const errorMessage: string = error.message;

const inspectMessageTime = Number(
errorMessage.match(/.*with message: (.*)"/)?.[1]
errorMessage.match(/.*with message: (\d+)/)?.[1]
);

return BigInt(inspectMessageTime);
Expand Down
2 changes: 1 addition & 1 deletion the_azle_book/book/404.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/azle.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/candid.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/canisters_overview.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/cross_canister.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/cycles.html

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions the_azle_book/book/deployment.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/examples.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/http.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/index.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions the_azle_book/book/installation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/internet_computer_overview.html

Large diffs are not rendered by default.

116 changes: 49 additions & 67 deletions the_azle_book/book/print.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/searchindex.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion the_azle_book/book/timers.html

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion the_azle_book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,3 @@
- [clear timer](./reference/timers/clear_timer.md)
- [set timer](./reference/timers/set_timer.md)
- [set timer interval](./reference/timers/set_timer_interval.md)
- [Wasm Binary Optimization](./reference/wasm_binary_optimization.md)
6 changes: 4 additions & 2 deletions the_azle_book/src/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ Here's an example that copies the `src/frontend/dist` directory on the deploying
"backend": {
"type": "azle",
"main": "src/backend/index.ts",
"assets": [["src/frontend/dist", "dist"]],
"build_assets": "npm run build"
"custom": {
"assets": [["src/frontend/dist", "dist"]],
"build_assets": "npm run build"
}
}
}
}
Expand Down
7 changes: 1 addition & 6 deletions the_azle_book/src/candid_rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand All @@ -83,11 +83,6 @@ cd hello_world
npm install
```

```bash
# install the azle dfx extension
npx azle install-dfx-extension
```

```bash
# start up a local ICP replica
dfx start --clean
Expand Down
12 changes: 0 additions & 12 deletions the_azle_book/src/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ dfx start --clean --host 127.0.0.1:8000

## Deploying to the local replica

Make sure you have installed the `azle dfx extension` (only needs to be done once per install per version of Azle):

```bash
npx azle install-dfx-extension
```

To deploy all canisters defined in your `dfx.json`:

```bash
Expand Down Expand Up @@ -95,12 +89,6 @@ curl -X POST -H "Content-Type: application/json" -d "{ \"hello\": \"world\" }" h

Assuming you are [setup with a cycles wallet](https://internetcomputer.org/docs/current/developer-docs/getting-started/cycles/cycles-wallet), then you are ready to deploy to mainnet.

Make sure you have installed the `azle dfx extension` (only needs to be done once per install per version of Azle):

```bash
npx azle install-dfx-extension
```

To deploy all canisters defined in your dfx.json:

```bash
Expand Down
2 changes: 1 addition & 1 deletion the_azle_book/src/deployment_candid_based.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ If you run into an error during deployment, try the following:

1. Ensure that you have followed the instructions correctly in [the installation chapter](./installation.md), especially noting [the build dependencies](./installation.md#build-dependencies)
2. Start the whole deployment process from scratch by running the following commands: `dfx stop` or simply terminate `dfx` in your terminal, `dfx start --clean`, `npx azle clean`, `dfx deploy`
3. Look for more error output by adding the `--verbose` flag to the `build` command in your `dfx.json` file like so: `"build": "npx azle build hello_world --verbose`
3. Look for more error output by adding the `AZLE_VERBOSE=true` environment variable into the same process that runs `dfx deploy`
4. Look for errors in each of the files in `~/.config/azle/rust/[rust_version]/logs`
5. Reach out in [the Discord channel](https://discord.gg/5Hb6rM2QUM)
9 changes: 2 additions & 7 deletions the_azle_book/src/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.21.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand All @@ -57,7 +57,7 @@ To create and deploy a simple sample application called `hello_world`:

```bash
# create a new default project called hello_world
npx azle new hello_world --http-server
npx azle new hello_world --http-server --experimental
cd hello_world
```

Expand All @@ -66,11 +66,6 @@ cd hello_world
npm install
```

```bash
# install the azle dfx extension
npx azle install-dfx-extension
```

```bash
# start up a local ICP replica
dfx start --clean
Expand Down
2 changes: 1 addition & 1 deletion the_azle_book/src/hello_world.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Create the following in `azle_hello_world/dfx.json`:
"type": "custom",
"main": "src/index.ts",
"candid": "src/index.did",
"build": "npx azle azle_hello_world",
"build": "node_modules/.bin/azle compile azle_hello_world",
"wasm": ".azle/azle_hello_world/azle_hello_world.wasm",
"gzip": true
}
Expand Down
2 changes: 1 addition & 1 deletion the_azle_book/src/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ node --version
Install the dfx command line tools for managing ICP applications:

```bash
DFX_VERSION=0.16.1 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
DFX_VERSION=0.22.0 sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
```

Check that the installation went smoothly by looking for clean output from the following command:
Expand Down
52 changes: 34 additions & 18 deletions the_azle_book/src/project_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ For a Candid RPC canister this would be the simplest corresponding `dfx.json` fi
"api": {
"type": "azle",
"main": "src/api.ts",
"candid_gen": "automatic"
"custom": {
"candid_gen": "automatic"
}
}
}
}
Expand All @@ -56,7 +58,9 @@ The command-line tools `dfx` require a Candid file to deploy your canister. HTTP
"api": {
"type": "azle",
"main": "src/api.ts",
"candid_gen": "automatic"
"custom": {
"candid_gen": "automatic"
}
}
}
}
Expand All @@ -73,7 +77,9 @@ If you would like to provide your own custom Candid file you can specify `"candi
"type": "azle",
"main": "src/api.ts",
"candid": "src/api.did",
"candid_gen": "custom"
"custom": {
"candid_gen": "custom"
}
}
}
}
Expand All @@ -93,7 +99,9 @@ Be aware that the environment variables that you specify in your `dfx.json` file
"api": {
"type": "azle",
"main": "src/api.ts",
"env": ["MY_ENVIRONMENT_VARIABLE"]
"custom": {
"env": ["MY_ENVIRONMENT_VARIABLE"]
}
}
}
}
Expand All @@ -109,11 +117,13 @@ See [the Assets chapter](./assets.md) for more information:
"api": {
"type": "azle",
"main": "src/api.ts",
"assets": [
["src/frontend/dist", "dist"],
["src/backend/media/audio.ogg", "media/audio.ogg"],
["src/backend/media/video.ogv", "media/video.ogv"]
]
"custom": {
"assets": [
["src/frontend/dist", "dist"],
["src/backend/media/audio.ogg", "media/audio.ogg"],
["src/backend/media/video.ogv", "media/video.ogv"]
]
}
}
}
}
Expand All @@ -129,12 +139,14 @@ See [the Assets chapter](./assets.md) for more information:
"api": {
"type": "azle",
"main": "src/api.ts",
"assets": [
["src/frontend/dist", "dist"],
["src/backend/media/audio.ogg", "media/audio.ogg"],
["src/backend/media/video.ogv", "media/video.ogv"]
],
"build_assets": "npm run build"
"custom": {
"assets": [
["src/frontend/dist", "dist"],
["src/backend/media/audio.ogg", "media/audio.ogg"],
["src/backend/media/video.ogv", "media/video.ogv"]
],
"build_assets": "npm run build"
}
}
}
}
Expand All @@ -152,7 +164,9 @@ Sometimes the build process is overly eager to include packages that won't actua
"api": {
"type": "azle",
"main": "src/api.ts",
"esm_externals": ["@nestjs/microservices", "@nestjs/websockets"]
"custom": {
"esm_externals": ["@nestjs/microservices", "@nestjs/websockets"]
}
}
}
}
Expand All @@ -170,8 +184,10 @@ This can be useful if you need to polyfill certain packages that might not exist
"api": {
"type": "azle",
"main": "src/api.ts",
"esm_aliases": {
"crypto": "crypto-browserify"
"custom": {
"esm_aliases": {
"crypto": "crypto-browserify"
}
}
}
}
Expand Down
10 changes: 4 additions & 6 deletions the_azle_book/src/reference/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@ Modify your `dfx.json` file with the `env` property to specify which environment
{
"canisters": {
"canister1": {
"type": "custom",
"type": "azle",
"main": "src/canister1/index.ts",
"build": "npx azle canister1",
"candid": "src/canister1/index.did",
"wasm": ".azle/canister1/canister1.wasm",
"gzip": true,
"declarations": {
"output": "test/dfx_generated/canister1",
"node_compatibility": true
},
"env": ["CANISTER1_PRINCIPAL", "CANISTER2_PRINCIPAL"]
"custom": {
"env": ["CANISTER1_PRINCIPAL", "CANISTER2_PRINCIPAL"]
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion the_azle_book/src/reference/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
- [Plugins](./plugins.md)
- [Stable Memory](./stable_memory/stable_memory.md)
- [Timers](./timers/timers.md)
- [Wasm Binary Optimization](./wasm_binary_optimization.md)
24 changes: 0 additions & 24 deletions the_azle_book/src/reference/wasm_binary_optimization.md

This file was deleted.

Loading
Loading