Popcorn (Popcorn v0.3.1)

View Source

Popcorn is a tool for running Elixir in the browser.

Summary

Functions

Builds a Popcorn .avm bundle.

Functions

cook(options \\ [])

@spec cook(
  out_dir: String.t(),
  start_module: module(),
  extra_beams: [String.t()],
  treeshake: boolean()
) ::
  :ok

Builds a Popcorn .avm bundle.

Options:

  • out_dir - The directory to write artifacts to. Required, unless provided via config.exs.
  • start_module - Optional; a module with start/0 function that will be called after applications start.
  • extra_beams - Compiled BEAMs that should be included in the generated bundle.
  • treeshake - [Experimental] When true, removes unused modules and functions to reduce bundle size. Also removes location data (files and line numbers), which results in less useful stack traces. Defaults to false.