Compatibility and browser limits

View Source

Popcorn uses a real BEAM virtual machine, but it runs inside a browser sandbox. Test each dependency against the selected Popcorn release.

Runtime capabilities

CapabilityStatusNotes
BEAM bytecodeSupportedThe packager includes compiled application ebin directories.
Processes and message passingSupportedStandard local BEAM semantics apply.
GenServer and supervisorsSupportedPopcorn applications use the standard OTP lifecycle.
Timers and monitorsSupportedBrowser suspension can delay wall-clock work.
Browser HTTPSupportedUse Popcorn.Fetch or its Req adapter.
Terminal input and outputSupportedUse writeStdin, output handlers, and resizeTty.
crypto, public_key, and sslOptionalUse the crypto runtime variant.
Dynamic NIF loadingNot supportedUse native support compiled into the selected runtime.
Native TCP and UDP socketsNot supportedBrowser networking rules apply.
Erlang distributionNot supportedUse an application protocol over browser networking.
Operating-system subprocessesNot supportedThe browser cannot start local commands.
Application priv filesManualThe packager does not copy them.
Mix runtime configurationManualThe packager does not transfer it into the browser.

Toolchain compatibility

Use the toolchain linked from the selected Popcorn release. The packager checks the host OTP version against the runtime manifest. It also reports known unsupported applications and version mismatches. It cannot detect every runtime assumption.

A successful version check does not prove that every dependency works. An application can still require an unsupported NIF or operating-system feature.

Review dependencies

Before you package an application, check these items:

  1. Check each dependency's OTP applications.
  2. Search for erlang:load_nif/2 and native build steps.
  3. Check for direct socket, subprocess, and file-system access.
  4. Check for required priv files.
  5. Check runtime configuration and environment requirements.
  6. Run the application in a production browser build.