Skip to content

Writing Native

Noah edited this page Nov 14, 2015 · 17 revisions

What is Elm Native

Javascript! Straight up Javascript, wrapped in a framework. It's not type checked, it runs on a Javascript engine just like JQuery.

There can be considered two parts to Elm:

  • Elm.Native
    • Native code, written by humans!
    • Follows a standard structure
    • N.B: must have "native-modules": true in elm-package.json for it to be included
  • Elm
    • Generated code, compiled from code written in Elm the language

This can be broken down further, into

  • The Elm runtime
    • Provided by the core library for elm
    • Contains a standard set of modules which are included in every Elm project
    • Also provides bootstrapping and setup for the framework
  • Elm modules
    • Anything that isn't part of core

Note that Elm modules could have native extensions that overwrite core libraries. This is how some meta-programming in Elm is achievable.

Now check out:

Clone this wiki locally