Popcorn (Popcorn v0.2.2)
View SourcePopcorn is a tool for running Elixir in the browser.
Summary
Functions
Bundles compiled project code into an .avm file.
Generates static artifacts to run the project in the browser.
Generates artifacts needed to run any Popcorn-based project.
Functions
Bundles compiled project code into an .avm file.
Options have the same semantics as in cook/1.
@spec cook( out_dir: String.t(), start_module: module(), target: :wasm | :unix, extra_beams: [String.t()], include_vm: boolean() ) :: :ok
Generates static artifacts to run the project in the browser.
Options:
out_dir- The directory to write artifacts to. Required, unless provided viaconfig.exs.start_module- Optional; a module withstart/0function that will be called after applications start.target-wasm(default) orunix. Ifunixis chosed, you need to build the runtime first withmix popcorn.build_runtime --target unixextra_beams- Compiled BEAMs that should be included in the generated bundle.include_vm- Iftrue, includes the VM and supporting files in the output directory (e.g. AtomVM.wasm, AtomVM.mjs and JS glue for wasm; AtomVM binary for unix).
Instead of calling cook/1, you can call ingredients/1 and then bundle/1.
Generates artifacts needed to run any Popcorn-based project.
Options have the same semantics as in cook/1.