Is it possibe to write Gnome extensions in Dart and compile it to JS?

155 views Asked by At

In theory it looks like it should be possible. There is: Dart-to-JavaScript compiler and even package to call JS from Dart and opposite.

But I didn't find any resources about it. Did anybody tried? Does anybody knows for sure that it is not possible?

1

There are 1 answers

0
andy.holmes On BEST ANSWER

Short answer: maybe, but I seriously doubt it's worth the effort.

To do anything useful with JavaScript, you need to write for a platform like the Web API, node.js, or GNOME in the case of GJS. Dart seems to support the Web API with its web library and its own platform with the vm library.

You might be able to write a transpiler that could transpose from a subset of Dart to GJS, but using any existing dart transpiler is probably impossible.