Skip to content

0.23.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Jul 05:47
· 320 commits to main since this release
38b2975

Major New Features

azle and azle/experimental

We have started to make the distinction between stable and experimental features. Azle is still in beta, but we are starting to put the separation in place now. Anything imported from azle over time we will guarantee to be production-ready in our opinion. Anything imported from azle/experimental will not be considered production-ready in our opinion.

Wasm binary manipulation during build process

Instead of automatically installing a Rust environment on the developer's machine, we now ship a pre-compiled Wasm binary. During build, the Wasm binary is manipulated automatically to swap out the final compiled JavaScript code and to change the exports to match the canister methods defined in the developer's source TypeScript or JavaScript code.

This should lead to a drastically simplified and quicker installation and build process generally.

Class-based syntax

We have introduced a new syntax/API that is simpler to implement and potentially use, and relies more directly on @dfinity/candid. This is the syntax/API that we'll be taking to production-readiness/1.0 in the coming months.

Detailed info is in this chapter of The Azle Book.

Open Value Sharing (OVS)

Open Value Sharing (OVS) is a protocol that enables automatic revenue streams for software dependencies. This release has an MVP of OVS for ICP. It is turned off by default. We'll be working one-on-one with one or more teams for testing before enabling OVS by default.

The first draft of the spec is coming out soon.

Read more here:

chunk

chunk imported from azle and ic.chunk imported from azle/experimental has been introduced to help overcome the instruction limit in canister_update methods.

Introducing an await chunk() or await ic.chunk() call into an @update method will reset its instruction limit. Be careful to understand the nuances of issues such as global state when introducing this await point, as it is a self-cross-canister call.

Jest

We have switched our testing framework away from a fully-custom testing solution to embracing Jest.

Major Breaking Changes

This release introduces many breaking changes. Not all are listed here. Our team is happy to answer questions on Discord during this transition period.

azle and azle/experimental

Many APIs have been removed from azle and moved to azle/experimental. The ic object has been moved to azle/experimental. Many of the ic object's functions are now exported directly from azle. azle now focuses on exporting the decorators for the class-based syntax and the IC APIs directly.

Much of the functional Canister syntax/API has been moved into azle/experimental. We intend for anything imported from azle to eventually be on the path to production-readiness and 1.0 (setOutgoingHttpOptions has been exported from azle by mistake and will be removed).

128 APIs removed

callRaw128, canisterBalance128, msgCyclesAccept128, and msgCyclesRefunded128 have been removed. The non-128 named functions now include the 128 functionality by default. In the JavaScript runtime these will use bigint, and in Rust they will use the u128 APIs.

Assets no longer included in Wasm binary

The assets property in the canister config of the dfx.json used to include up to ~90 MiB of assets in the Wasm binary during compilation. These assets were then available during canister_init and canister_post_upgrade. Assets are now no longer available in the Wasm binary and are instead uploaded after canister_init and canister_post_upgrade.

Some did files no longer included in Wasm binary

A canister's own did file is no longer included in the Wasm binary by default. The /candid/icp/icrc.did file is no longer included in the binary by default.

StableBTreeMap no longer returns Opt

Various StableBTreeMap methods have had the Candid type object Opt removed and replaced with a union of null.

Raw APIs consolidated

callRaw, notifyRaw and replyRaw have been consolidated into the call, notify, and reply APIs.

Environment variables removed

AZLE_DOCKERFILE_HASH, AZLE_SKIP_COMPILER_INFO, and AZLE_USE_DOCKERFILE environment variables have been removed.

Native compilation removed

The --native-compilation command-line flag and functionality have been removed.

32-bit stable memory APIs removed

The 32-bit stable memory APIs stableGrow, stableRead, stableSize, and stableWrite are now 64-bit. The 64-bit versions have been removed.

Test framework changed

The examples, tests, and testing framework have seen a massive change. We've introduced Jest, removed ts-node, deleted some examples/tests, rearranged the directory structure, and changed some exports from our own testing framework.

Guard functions removed

Guard functions have been entirely removed from the Azle APIs.

Large assets removed

The large_assets property of the canister config of dfx.json has been removed. assets now has the functionality that large_assets had.

reload_js now always in the binary

The reload_js Rust-defined update method is now compiled into every Wasm binary. Before it was only in the binary if AZLE_AUTORELOAD was set to true.

What's Changed

Full Changelog: 0.22.0...0.23.0