Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News NativeScript 6.3, 6.4, 6.5 Releases Add Svelte, WebAssembly, KotlinJS and Performance Improvements

NativeScript 6.3, 6.4, 6.5 Releases Add Svelte, WebAssembly, KotlinJS and Performance Improvements

This item in japanese


The recent NativeScript 6.3, 6.4, and 6.5 releases add a wide range of new features to their framework for building native mobile apps with TypeScript or JavaScript. Highlights in these releases include performance improvements to CSS parsing and CLI commands, support WebAssembly on Android and Svelte, 3D View Transformations, and experimental KotlinJS Support.

The NativeScript 6.3 release adds a new CSS parser leveraging csstree, improving startup performance by up to 30% compared to the existing reworkcss parser. This new parser became the default with the NativeScript 6.4 release.

Hot module reloading (HMR) also receives a significant improvement with NativeScript 6.3. Previously, applications using the nativescript-worker-loader package were unable to benefit from HMR. The resolution of this issue makes HMR available for most NativeScript applications.

NativeScript's core support is for applications authored with Angular, Vue.js, TypeScript, and JavaScript. NativeScript 6.3 adds support for Svelte to the NativeScript playground.

The NativeScript 6.4 release improves support for custom webpack configurations. Before this release, modifying the webpack configuration would require manually merging changes with each NativeScript release with local modifications. NativeScript developers can now move all custom webpack code into a separate file and reference the webpackConfigPath property in nsconfig.json.

NativeScript 6.4 introduces metadata filtering, solving a challenge explained by NativeScript program manager Emil Tabakov:

Up until now, NativeScript included all supported native entities in its metadata, and app authors had no control over this behavior. This allowed app and plugin authors to freely call any native API from JavaScript and was perfect during app and plugin development. In some cases, however, having metadata for all the APIs is undesirable:

  • There could be security implications involved and mentioning names of entities that shouldn’t be known in the metadata binary files could be unacceptable
  • App size could increase due to unnecessary metadata which is never used. In fact, only a fraction of what is available is actually called by an app, so most of the entities are actually needless.

NativeScript 6.4 adds control over the generated metadata through blacklisting and whitelisting symbols for their native names. Tabakov explains that this provides significant improvements to NativeScript's core modules in this release:

When we enabled the filtering in {N}'s core modules for iOS, the metadata file got reduced from ~5.5 MB to ~1.2 MB per each CPU architecture (arm64, armv7). As for Android - from ~2.1 MB то ~1.1 MB. Actually, we’ve been pretty conservative when deciding what to filter by default. So if you’re feeling adventurous you can try being more aggressive and share with us what you’ve achieved!

NativeScript 6.4 also adds 3D rotations which are explained via this screenshot from the NativeScript release:

NativeScript 3D Transformations

NativeScript 6.4 also adds initial WebAssembly support for the Android platform. Note that WebAssembly is not currently available on iOS as it requires JIT support, which Apple does not currently allow for third-party JavaScript engines or applications.

In addition to NativeScript's support for npm and yarn, NativeScript now supports pnpm, which reduces disk space when leveraging the same dependency across multiple projects.

NativeScript 6.4 also updates the version of the V8 JavaScript engine to the V8 8.0 release, which provides many performance improvements and support for new ES2020 features, including support for optional chaining and the nullish coalescing operator.

Version 6.5 of NativeScript improves the Tabs and BottomNavigation components through programmatic creation. Additionally, the TabStrip component adds styling properties to support the Material Design Guidelines better. Furthermore, the iOS version of Tabs receives additional options for styling in the NativeScript 6.5 release.

The final significant addition within these releases of NativeScript is the introduction of experimental KotlinJS support in NativeScript 6.5. The NativeScript team seeks feedback from the community of the HelloWorld NativeScript KotlinJS example.

To get started with NativeScript or to upgrade from earlier versions of NativeScript, developers can install it via npm:

npm install -g nativescript

NativeScript is open source software available under the Apache 2 license. Contributions and feedback are encouraged via the NativeScript GitHub project and should follow the NativeScript contribution guidelines and code of conduct.

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p