@swmansion/popcorn 0.4.0-next.2 → 0.4.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/events.d.ts +1 -1
- package/dist/index.mjs +5 -1
- package/dist/runtimes/core/beam.emu.mjs +139 -139
- package/dist/runtimes/core/beam.mjs +139 -139
- package/dist/runtimes/core/beam.wasm +0 -0
- package/dist/runtimes/crypto/beam.emu.mjs +518 -517
- package/dist/runtimes/crypto/beam.mjs +518 -517
- package/dist/runtimes/crypto/beam.wasm +0 -0
- package/dist/types.d.ts +1 -0
- package/dist/worker.mjs +21 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Run Elixir in a browser with OTP/BEAM compiled to WebAssembly.
|
|
|
4
4
|
This prerelease replaces the AtomVM runtime used by Popcorn 0.3.x.
|
|
5
5
|
|
|
6
6
|
Start with the
|
|
7
|
-
[versioned Popcorn guide](https://popcorn.hexdocs.pm/0.4.0-next.
|
|
7
|
+
[versioned Popcorn guide](https://popcorn.hexdocs.pm/0.4.0-next.3/introduction.html).
|
|
8
8
|
It includes a complete Mix and Vite tutorial.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
@@ -13,12 +13,12 @@ It includes a complete Mix and Vite tutorial.
|
|
|
13
13
|
npm install @swmansion/popcorn@next
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Add `{:popcorn, "0.4.0-next.
|
|
16
|
+
Add `{:popcorn, "0.4.0-next.3"}` to your Elixir application's dependencies.
|
|
17
17
|
Run `mix deps.get` before building the JavaScript application. The bundler
|
|
18
18
|
plugins invoke Mix locally to compile and package application and
|
|
19
19
|
standard-library code.
|
|
20
20
|
|
|
21
|
-
Use the toolchain pinned in [mise.toml](https://github.com/software-mansion/popcorn/blob/v0.4.0-next.
|
|
21
|
+
Use the toolchain pinned in [mise.toml](https://github.com/software-mansion/popcorn/blob/v0.4.0-next.3/mise.toml).
|
|
22
22
|
The packager checks host OTP compatibility against the selected runtime's manifest.
|
|
23
23
|
|
|
24
24
|
## Configure Vite
|
|
@@ -85,4 +85,4 @@ Serve `.wasm` as `application/wasm`. Serve compressed `.tar.gz` files with `Cont
|
|
|
85
85
|
The package also emits uncompressed tar files and Brotli variants. Brotli uses standard effort by default. Set `brotliEffort: "max"` for maximum compression in release builds.
|
|
86
86
|
|
|
87
87
|
The JavaScript bridge currently requires a Content Security Policy that permits `unsafe-eval`.
|
|
88
|
-
See the [versioned Elixir API](https://popcorn.hexdocs.pm/0.4.0-next.
|
|
88
|
+
See the [versioned Elixir API](https://popcorn.hexdocs.pm/0.4.0-next.3/) for interoperability details.
|
package/dist/events.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type Mapper } from "./etf";
|
|
|
3
3
|
import type { AnyValue, BeamBootOptions, BeamEvent, BeamSendPayload, BeamTarget } from "./types";
|
|
4
4
|
type BootEvent = {
|
|
5
5
|
type: "popcorn:boot";
|
|
6
|
-
payload: Pick<BeamBootOptions, "emulatorArgs" | "extraArgs" | "env" | "ttySize"> & {
|
|
6
|
+
payload: Pick<BeamBootOptions, "emulatorArgs" | "extraArgs" | "env" | "ttySize" | "noshell"> & {
|
|
7
7
|
otpAssetsRoot?: string;
|
|
8
8
|
};
|
|
9
9
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -747,7 +747,11 @@ class Popcorn {
|
|
|
747
747
|
this.vmWorker.addEventListener("message", onBootMessage);
|
|
748
748
|
toVm(this.vmWorker, {
|
|
749
749
|
type: "popcorn:boot",
|
|
750
|
-
payload: {
|
|
750
|
+
payload: {
|
|
751
|
+
...this.opts.beam,
|
|
752
|
+
ttySize: this.ttySize,
|
|
753
|
+
noshell: this.opts.tty === undefined,
|
|
754
|
+
},
|
|
751
755
|
});
|
|
752
756
|
});
|
|
753
757
|
}
|