We’re excited to announce the release of Clarinet v2.0.0. This follows the release of the Clarinet SDK and ushers in a new era of how you use Clarinet. This new release comes with a number of changes, including:
Removing Deno
We’ve officially removed Deno, a JavaScript runtime, from Clarinet. Some background context:
It’s really useful to write unit tests for Clarity smart contracts in JavaScript or TypeScript, but in order to do that, you need to be able to interact with Clarinet and the ClarityVM from a JS runtime.
Since our tooling is written in Rust, and Deno is written in Rust, it was a natural solution for that need. However, Deno proved difficult to embed in Clarinet, and it was difficult to upgrade and maintain. As a result, we often lagged behind Deno releases, which led to Clarinet relying on outdated dependencies which then caused downstream issues (such as making it difficult to compile to Rust or release on Homebrew).
To solve those issues, we’ve exported Clarinet in a way that it can run in any JavaScript runtime that supports WebAssembly (WASM), and we no longer need to embed the runtime in Clarinet itself. This change will make it easier for our team to maintain Clarinet moving forward.
This change also means that <code-rich-text>clarinet test<code-rich-text> and <code-rich-text>clarinet run<code-rich-text> have been deprecated. Moving forward, you will use <code-rich-text>npm test<code-rich-text> in the SDK instead. You can learn more about how to test your code in the SDK in our docs here.
Lastly, by removing Deno, Clarinet now also has the benefit of a smaller binary size, going from 32MB with Deno to 12MB without.
Adding a Global Configuration File
With this release, Clarinet now has a global configuration file <code-rich-text>~/.clarinet/clarinetrc.toml<code-rich-text>. More configuration options will be added with time, but for now, it introduces only two configuration options:
With the hints enabled, Clarinet will show you some tips on how to use it. And by enabling telemetry, you’ll help us to improve Clarinet by automatically sending diagnostics and your usage data to Hiro. Note that only high level usage information is sent to us: no information identifying you or your project is collected.
Thanks a lot to Brady Ouren, a community member who worked on this feature!
Improving Code Quality
This release also includes a few bug fixes, and we’ve improved Clarinet’s code quality. Thanks to clippy, we fixed 500+ lint warnings and errors, and we also updated a number of dependencies.
Start Coding
With this release, Clarinet enters a new era: one that is easier to maintain and friendlier to JavaScript developers, and one that offers a more seamless development experience.
Stay tuned for more Clarinet updates coming this fall. If you have any questions, reach out to us on the #clarinet channel on Discord.