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

release v0.19 #162

Merged
merged 15 commits into from
Jul 13, 2024
144 changes: 144 additions & 0 deletions blog/2024-07-09-boa-release-19.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<!-- ---
layout: post
tags: [post]
title: "Boa release v0.19"
author: Boa Developers
--- -->

## Summary

Boa v0.19 is now available! After 4 months of development we are very happy to present you the latest
release of the Boa JavaScript engine. Boa makes it easy to embed a JS engine in your projects, and
you can even use it from WebAssembly. See the [about](/about) page for more info.

In this release, our conformance has grown from 85.03% to 86.20% in the official ECMAScript Test Suite
(Test262). Interestingly, this isn't due to us passing more tests, but in fact the total number of tests from test262
[reducing by around 2000](https://github.com/tc39/test262/commit/ea2268aa4382013f5533b91f9ef50366ad065a86) from the [removal of custom calendars and timezones](https://github.com/tc39/proposal-temporal/issues/2826). Overall, Boa's conformance in real terms has improved by ~6%.

You can check the full list of changes [here][changelog], and the full information on conformance
[here][conformance].

## Highlights

### Temporal

Boa is continuing to progress on the [Temporal](https://github.com/tc39/proposal-temporal). The Temporal API is a new
set of built-in objects and functions that is designed to be a more modern replacement for the `Date`
object, providing a more feature-rich and flexible API for working with dates and times.

It is currently a [stage 3 proposal](https://tc39.es/proposal-temporal/docs/) and we are working
alongside the TC39 champions to put together a solid Rust implementation. Since Temporal is such an
extensive specification, we have done most of the work outside of Boa so that it can be used in other
projects. This work can be found in the [temporal_rs](https://github.com/boa-dev/temporal/) repository.

We hope to release a full blog post on Temporal in the future, but for now you can see the previous release notes for some examples on how to use it.
You can also look at the [Temporal Cook Book](https://tc39.es/proposal-temporal/docs/cookbook.html) for some examples too!

If you're interested in learning more or want to contribute to the native Rust implementation of
Temporal, feel free to check out `temporal_rs`'s [issues](https://github.com/boa-dev/temporal/issues)!

Boa's conformance on the Temporal test suite has grown from 23.99% to 27.86% in this release.
jasonwilliams marked this conversation as resolved.
Show resolved Hide resolved

### New Benchmark Suite, Faster CI and reduced repo size

Boa has had an overhaul of its older criterion benchmark suite to a new [end to end benchmark suite](https://boajs.dev/benchmarks).
We had finally outgrown the old benchmark suite and needed a new one that could handle the new features and improvements we were making to the engine.
The former benchmark suite has been there almost since the beginning, and was created as a way to keep an eye on certain functions and routines within Boa itself. Although useful, it
wasn't comparable to other engines due to being so specific on how Boa works.

The new suite is taken from [V8's old benchmark suite](https://github.com/mozilla/arewefastyet/tree/master/benchmarks/v8-v7) which, despite being deprecated, is still for comparative performance.
Over time we will eventually need to work with other engines to have a more advanced benchmarking suite which can take into account modern JavaScript, but for now this is a good start.

This change also offered a nice side effect of not having benchmark or test262 data in the main repository anymore. Last time we released we had [reports](https://www.reddit.com/r/rust/comments/1b91ora/comment/ktue8rf/) of the repository being too large, so we've taken steps to reduce the size of the repository by moving this data to a separate repository and building a nightly version for reporting. Not only this makes it easier for anyone cloning Boa today but pushes to `main` are now much faster due to us not having to run test262 or Benchmarks each time.

## Migration to Matrix

The Boa team will be migrating to Matrix from our Discord servers over the course of this year. This means we will hang out in the [`#boa:matrix.org`](https://matrix.to/#/#boa:matrix.org) room and will be available for questions and discussions there. We will also be using Matrix for other break-out rooms such as [Performance](https://matrix.to/#/!odQJQiuPFJtUBzgoXY:matrix.org?via=matrix.org&via=mozilla.org), [Intl](https://matrix.to/#/!rsWLMsIzfquQAbDoak:matrix.org?via=matrix.org) and [Temporal](https://matrix.to/#/!DeQjFAUjAPAffIsCgq:matrix.org?via=matrix.org&via=mozilla.org&via=igalia.com) We will be keeping the Discord server open for a while to allow people to migrate over, but we will eventually close it down sometime in 2025.
jasonwilliams marked this conversation as resolved.
Show resolved Hide resolved

Boa has long been a user of Discord, pretty much since the beginning of the project, but as it has grown we have chosen to move closer to other communities using Matrix such as TC39 who work on JavaScript standard, our closer ties with them (when implementing Temporal plus other specs) mean working on the same platform makes sense.
jasonwilliams marked this conversation as resolved.
Show resolved Hide resolved

## Optimizations

### Release binary stripping

Boa's binaries are on the larger side by default due to including ICU data. We may eventually move to a system where this needs to be fed from the host. However, until then there are other tricks we can employ to bring down our size, one of those is binary stripping. We can remove debug information from the release binary to reduce the size.

| crate | v0.18 | v0.19 |
| ---------- | ----- | ----- |
| boa | 26MB | 25MB |
| boa_tester | 27MB | 25MB |

### Dense array storage variants for i32 and f64

This release adds [dense array storage](https://github.com/boa-dev/boa/pull/3760) variants for `i32` and `f64` types. This allows us to store arrays of these types more efficiently, and also allows us to optimize certain operations on these arrays.

If you want to inspect the storage type of an array in Boa you can use the `$boa.object.indexedStorageType()` APi. Here are [some examples](https://github.com/boa-dev/boa/blob/d3e539593fe206f18d44f20498cb54be15477a58/docs/boa_object.md#function-boaobjectindexedstoragetypeobject):

```js
let a = [1, 2];

$boa.object.indexedStorageType(a); // 'DenseI32'

a.push(0xdeadbeef);
$boa.object.indexedStorageType(a); // 'DenseI32'

a.push(0.5);
$boa.object.indexedStorageType(a); // 'DenseF64'

a.push("Hello");
$boa.object.indexedStorageType(a); // 'DenseElement'

a[100] = 100; // Make a hole
$boa.object.indexedStorageType(a); // 'SparseElement'
```

Much of this work is possible thanks to our implementation of [Object Shapes](https://github.com/boa-dev/boa/blob/main/docs/shapes.md)

###

## Intl updates

## Builtins updates

## APIs updates

### Experimental features

## Conclusion

### How can you support Boa?

Boa is an independent JavaScript engine implementing the ECMAScript specification, we rely on the
support of the community to keep it going. If you want to support us, you can do so by donating to
our [open collective]. Proceeeds here go towards this very website, the domain name, and remunerating
members of the team who have worked on the features released.

If financial contribution is not your strength, you can contribute by asking to be assigned to one of
our [open issues], and asking for mentoring if you don't know your way around the engine. Our
[contribution guide] should help you here. If you are more used to working with JavaScript or frontend
web development, we also welcome help to improve our web presence, either in [our website], or in our
[testing representation] page or benchmarks page. You can also contribute to our Criterion benchmark
comparison GitHub [action].

We are also looking to improve the documentation of the engine, both for developers of the engine
itself and for users of the engine. Feel free to contact us in [Matrix].

[open collective]: https://opencollective.com/boa
[open issues]: https://github.com/boa-dev/boa/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee
[contribution guide]: https://github.com/boa-dev/boa/blob/main/CONTRIBUTING.md
[our website]: https://github.com/boa-dev/boa-dev.github.io
[testing representation]: https://github.com/boa-dev/boa/issues/820
[action]: https://github.com/boa-dev/criterion-compare-action
[Matrix]: https://matrix.to/#/#boa:matrix.org

### Thank You

Once again, big thanks to [all the contributors][contributors] of this release!!

[contributors]: https://github.com/boa-dev/boa/graphs/contributors?from=2023-07-08&to=2024-03-05&type=c
[changelog]: https://github.com/boa-dev/boa/blob/v0.18/CHANGELOG.md
[conformance]: https://boajs.dev/boa/test262/
[feed]: https://boajs.dev/blog/rss.xml
[collective]: https://opencollective.com/boa
[easy_issues]: https://github.com/boa-dev/boa/issues?q=is%3Aopen+is%3Aissue+label%3AE-Easy
[first_issues]: https://github.com/boa-dev/boa/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22