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

Add TodoMVC for dart2js & dart2wasm #502

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mkustermann
Copy link

This is a Jaspr Dart Web application compiled with dart2js and dart2wasm.

The source is from [0] and was compiled with a modified Jaspr CLI tool (see PR in [1]) using the following commands:

% rm -rf build
% dart run --resident <jaspr>/packages/jaspr_cli/bin/jaspr.dart build -O4 --extra-js-compiler-option=--no-minify
% rm -rf build
% dart run --resident <jaspr>/packages/jaspr_cli/bin/jaspr.dart build -O4 --extra-wasm-compiler-option=--no-strip-wasm --experimental-wasm

The relevant files in build/jaspr/* were copied to the Speedometer benchmark folders.

Used Dart SDK version is: 3.8.0-edge.4c8aedcb57fe678e6d30acfdc021aa9888576638

Before landing we should figure out:

* do we want both dart2js and dart2wasm?
* do we want -O2 or -O4?
* can we rely on `js-string` builtin to be evailable or not?

[0] https://github.com/mkustermann/todomvc
[1] schultek/jaspr#397

This is a Jaspr Dart Web application compiled with dart2js and
dart2wasm.

The source is from [0] and was compiled with a modified Jaspr CLI tool
(see PR in [1]) using the following commands:

```
% rm -rf build
% dart run --resident <jaspr>/packages/jaspr_cli/bin/jaspr.dart build -O4 --extra-js-compiler-option=--no-minify
```

```
% rm -rf build
% dart run --resident <jaspr>/packages/jaspr_cli/bin/jaspr.dart build -O4 --extra-wasm-compiler-option=--no-strip-wasm --experimental-wasm
```

The relevant files in `build/jaspr/*` were copied to the Speedometer
benchmark folders.

Used Dart SDK version is: 3.8.0-edge.4c8aedcb57fe678e6d30acfdc021aa9888576638

Before landing we should figure out:

    * do we want both dart2js and dart2wasm?
    * do we want -O2 or -O4?
    * can we rely on `js-string` builtin to be evailable or not?

[0] https://github.com/mkustermann/todomvc
[1] schultek/jaspr#397
Copy link

netlify bot commented Mar 7, 2025

Deploy Preview for webkit-speedometer ready!

Name Link
🔨 Latest commit ddfa6de
🔍 Latest deploy log https://app.netlify.com/sites/webkit-speedometer/deploys/67cb057452ee550008b5e5e0
😎 Deploy Preview https://deploy-preview-502--webkit-speedometer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mkustermann mkustermann marked this pull request as draft March 10, 2025 12:59
Suites.push({
name: "TodoMVC-Dart2JS",
url: "resources/todomvc/dart2js-jaspr/index.html",
tags: ["todomvc"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they both should have the experimental tag set, and should be have disabled: true,

@camillobruni
Copy link
Contributor

now that we have 3.1 release... let me try to answer some questions :).

  • do we want both dart2js and dart2wasm?
    • Let's add both versions separately as experimental workloads
  • do we want -O2 or -O4?
    • Mostly deferring to you, what's the most likely configuration you ship? I've heard this is likely closer to -O2 in the long run?

Would it be possible to get the build script as part of the PR? This way we can get this re-generated easier in the future.

@camillobruni
Copy link
Contributor

As for the js-strings builtins, given that safari doesn't ship it yet we could evaluate the polyfill and/or provide a version without the js-strings as comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants