Azle: A TypeScript CDK for JavaScript Developers on the Internet Computer

The Azle canister development kit has now reached feature parity with the Motoko and Rust CDKs.

Jordan Last
The Internet Computer Review
3 min readAug 16, 2022

--

Hi everyone, Jordan Last from Demergent Labs here. Azle is a canister development kit we’ve developed that allows developers to write Internet Computer canister smart contracts in TypeScript, and technically JavaScript as well.

This is a big deal. TypeScript and JavaScript are among the world’s most popular programming languages, with extensive communities, libraries, documentation, YouTube videos, blog posts, podcasts, and expertise. Azle makes it possible for millions of TypeScript and JavaScript developers around the world to write smart contracts on the Internet Computer using their favorite tools and libraries.

Motoko and Rust are two established, performant languages for development on the IC. Azle offers an approachable alternative for JavaScript full-stack developers. I’m now pleased to announce that Azle has recently reached feature parity with the Rust and Motoko CDKs.

Feature Parity

Each CDK provides slightly different access to IC APIs for developers. Azle now provides access to TypeScript APIs that unlock nearly all of the IC functionality available to you when writing canisters in Rust or Motoko, including core IC system features such as creating canisters, accessing the replica time, and inter-canister calls.

To compare features across all three CDKs, check out the Azle feature parity documentation.

Examples

Our library of example applications is large and continues to grow. Various examples have equivalent source code, showing how the same application can be written in TypeScript, Rust, and Motoko. These examples should be useful for learning to program canisters in either of the three languages.

Check out the examples in the Azle repository.

We’re also working on more advanced examples that are proofs of concept or reference implementations of real-world applications, such as the Multisig Vault and the IC Chainlink Data Feeds.

Benchmarks

We’ve also been working on an automated benchmarking process. The main purpose of the benchmarks is to provide those interested in adopting Azle with transparent data that will allow them to assess the monetary cost differences when choosing Azle over Rust or Motoko. As an added benefit, Rust and Motoko developers should learn more about where those languages have performance differences relative to each other.

The first round of benchmarks are instructive but not perfect. Based on their results, we feel comfortable with the idea that Azle canisters will generally cost about 2x more than canisters written in Rust or Motoko. Actual costs will depend on many factors, and if you are interested in digging through the data yourself head on over to the Azle benchmarks section.

Now for what’s on the horizon…

HTTP(S), tECDSA, and Bitcoin

We’re working to provide out-of-the-box support for three major upcoming features on the IC: outgoing HTTP(S) requests, threshold ECDSA, and the Bitcoin integration. The HTTP(S) functionality is already finished and out on a release candidate, and we’re working on tECDSA and Bitcoin right now.

These three features will greatly expand the set of use cases available to canisters. I’ve personally been focused on the HTTP(S) functionality, and though tricky, it’s been exciting to work with.

Path to Production-readiness

Azle is making steady progress toward a hardened and production-ready CDK for the IC. We think it’s suitable for some projects right now (MVPs, PoCs, apps with data backups or low security risks, etc), but we don’t generally recommend Azle for production yet.

The path to production-readiness includes at least the following: extensive automated property testing, multiple independent security reviews, and the release of Boa 1.0. By the end of 2022, we’re hoping to have made significant progress down the path.

If you want to use your TypeScript skills to build for the decentralized cloud, then get started today and reach out if you have any questions.
____

Start building at internetcomputer.org and join the developer community at forum.dfinity.org.

--

--