Popcorn (Popcorn v0.1.0)
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, compile_artifacts: [String.t()] ) :: :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 unixcompile_artifacts- Compiled BEAMs and other artifacts that should be included in the generated bundle. Defaults to all the.beamand.appfiles for the application and dependencies.
Instead of calling cook/1, you can call ingredients/1 and then bundle/1.
@spec ingredients(out_dir: String.t(), target: :wasm | :unix) :: :ok
Generates artifacts needed to run any Popcorn-based project.
Options have the same semantics as in cook/1.