Skip to content

Commit 1e6697e

Browse files
committed
Revised release post
1 parent c5d6f0b commit 1e6697e

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

content/post/elixirscript-0.30.0-released.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,11 @@ date = 2017-08-09T00:29:03-05:00
44
draft = true
55
+++
66

7-
ElixirScript 0.30 is a large release with lots of changes. It includes a rewrite of the compiler, a change in JavaScript interoperability and much more. These changes make writing ElixirScript projects feel like writing a normal Elixir project. These changes make this the best release of ElixirScript so far! This is a great point to give ElixirScript a try for yourself. This post will describe the major changes in this version.
8-
9-
## Erlang 20 and Elixir 1.5 (compiled with Erlang 20) required
10-
11-
This release requires the above because it reads debug information from beam files. This is the same information used for `Exception.blame/3` in Elixir 1.5. This means ElixirScript can compile any Elixir module. One benefit is ElixirScript can now compile the actual Elixir standard library. In earlier versions, it had to reimplement the standard library. Sections below describe the other benefits of this.
12-
13-
## Can now use normal Elixir dependencies
14-
15-
With the above, ElixirScript can also compile your project's dependencies to JavaScript.
16-
17-
## ElixirScript-specific packages are now possible
18-
19-
This is one of the most exciting changes. It is now possible to create packages that ElixirScript code can use. This is thanks to the changes described above and the new FFI described later. These are normal mix projects which may or may not have FFI modules and some JavaScript files.
20-
21-
If creating a Hex package for ElixirScript, please prepend `elixir_script` to your package name. This is so that it is clear your package is to be use with ElixirScript. For example, a React package would be named `elixir_script_react`. [Here is an example](https://github.com/elixirscript/elixirscript_react).
7+
ElixirScript 0.30 is a large release with lots of changes. It includes a rewrite of the compiler, a change in JavaScript interoperability and much more. This is also the first version to require Erlang 20 and Elixir 1.5, compiled with Erlang 20. Writing ElixirScript projects feel more like writing a normal Elixir project. These changes make this the best release of ElixirScript so far! This is a great point to give ElixirScript a try for yourself. This post will describe the major changes in this version.
228

239
## Foreign Function Interface (FFI)
2410

25-
JavaScript interoperability has changed in this version. ElixirScript now interacts with JavaScript using an FFI. This allows for a stricter barrier between Elixir code and JavaScript. It also allows for the ability to make packages. Another benefit is that there are far fewer warnings during compilation time. As an example let's create an FFI module for some HTTP specific functions we want to use from JavaScript. An FFI module has 2 parts: the Elixir module and the corresponding JavaScript module.
11+
JavaScript interoperability has changed in this version. ElixirScript now interacts with JavaScript using an FFI. This allows for a stricter barrier between Elixir code and JavaScript. It also allows for the ability to make packages designed to work with ElixirScript. Another benefit is that there are far fewer warnings during compilation time. As an example let's create an FFI module for some HTTP specific functions we want to use from JavaScript. An FFI module has 2 parts: the Elixir module and the corresponding JavaScript module.
2612

2713
Our Elixir module, `MyApp.Http`
2814
```elixir
@@ -55,22 +41,34 @@ With the above in place, you can call functions on `MyApp.Http` as you would any
5541

5642
For more information, check the documentation for `ElixirScript.FFI`.
5743

58-
## Limitations
44+
## Dependencies
5945

60-
`receive` is still not supported. When ElixirScript encounters a `receive` call during compilation, the compiler will show a warning, but will continue. During runtime these calls will throw an error. With `receive` not yet supported, this also means most of OTP is not supported as well.
46+
ElixirScript can compile your project's dependencies to JavaScript. This means you can use many of your favorite Hex packages in ElixirScript code. It is also now possible to create packages that ElixirScript code can use. These are normal mix projects which may or may not have FFI modules with their corresponding JavaScript files.
47+
48+
If creating a Hex package for ElixirScript, please prepend `elixir_script` to your package name. This is so that it is clear your package is to be use with ElixirScript. For example, a React package would be named `elixir_script_react`. [Here is an example](https://github.com/elixirscript/elixirscript_react).
6149

6250
## A Call to Arms
6351

6452
Calls to Erlang functions that the Elixir standard library make have to be reimplemented in JavaScript. There are many that are implemented, but there are more that need to be. This effects the availability of some Elixir standard library calls. A major contribution to ElixirScript would be to help with an implementation of an Erlang function that is blocking the use of an Elixir function you want to use!
6553

6654
## Breaking Changes
6755

68-
ElixirScript now only works as a mix compiler. This means there will no longer be an escript for download and plugins for Brunch and Webpack will no longer work with this and future versions as well.
56+
ElixirScript now only works as a mix compiler. This means there will no longer be an escript for download and plugins for Brunch and Webpack will no longer work with this and future versions.
6957

7058
ElixirScript now only supports output of ES modules. This is mainly so that there is no confusion about how to implement the JavaScript portion of FFI modules.
7159

60+
## Limitations
61+
62+
`receive` is still not supported. When ElixirScript encounters a `receive` call during compilation, the compiler will show a warning, but will continue. During runtime these calls will throw an error. With `receive` not yet supported, this also means most of OTP is not supported as well.
63+
7264
## Conclusion
7365

74-
For more information regarding changes, please check the [changelog](https://github.com/elixirscript/elixirscript/blob/master/CHANGELOG.md). For more information about how to get started, the FFI, and other things, check out the [docs](https://hexdocs.pm/elixir_script)
66+
For more information regarding changes, please check the [changelog](https://github.com/elixirscript/elixirscript/blob/master/CHANGELOG.md).
67+
68+
For more information on getting started with ElixirScript, check the [ElixirScript documentation](https://hexdocs.pm/elixir_script/ElixirScript.html)
69+
70+
For more information on FFI, and other things, check out the [FFI documentation](https://hexdocs.pm/elixir_script/ElixirScript.FFI.html)
71+
72+
For more information on JavaScript Interoperability, check out the [JavaScript interoperability documentation](https://hexdocs.pm/elixir_script/JavaScriptInterop.md)
7573

7674
Finally, I want to give a great big thanks to the Elixir Core Team! Thanks for making the updates in Erlang and Elixir that allowed ElixirScript's progress to continue. And thank you for being available to answer questions and to give great advice!

0 commit comments

Comments
 (0)