You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-6
Original file line number
Diff line number
Diff line change
@@ -41,18 +41,36 @@ After each command, the files in the memory filesystem are gathered and passed t
41
41
42
42
## Compiling OpenSSL
43
43
44
-
First, [install the Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html). You can then easily recompile the OpenSSL WebAssembly binary by calling the following command. Note that this is not neccessary, as [it's already compiled](/emscr/binary).
44
+
You can compile the OpenSSL WebAssembly binary by calling one the following commands. Note that this is not neccessary, as [it's already compiled](/emscr/binary).
45
+
46
+
Both call the script in [`emscr/builds/openssl/build.sh`](/emscr/builds/openssl/build.sh). It fetches and extracts the OpenSSL sources as a `.tar.gz` archive from https://www.openssl.org/source. It then compiles them with Emscripten by calling `emconfigure` and `emmake` (both with specific flags).
47
+
48
+
The created files `openssl.wasm` and `openssl.js` are then copied into `emscr/binary`, where the webpack server will deliver them from.
49
+
50
+
### Option 1: Using Docker
51
+
52
+
First, [install and start Docker](https://docs.docker.com/get-docker). Then run the following command:
45
53
46
54
```shell
47
-
$ npm run build:openssl
55
+
$ npm run build:openssl:docker
48
56
```
49
57
50
-
This will call the script in[`emscr/builds/openssl/build.sh`](/emscr/builds/openssl/build.sh). It fetches the OpenSSL sources as a `.tar.gz` archive from https://www.openssl.org/source and extracts it. It then compiles them with Emscripten by calling `emconfigure` and `emmake` (both with specific flags).
58
+
This will fetch Emscripten's Docker image[`emscripten/emsdk`](https://hub.docker.com/r/emscripten/emsdk) and run the build script.
51
59
52
-
The created files `openssl.wasm` and `openssl.js` are then copied into `emscr/binary`, where the webpack server will deliver them from.
60
+
> This option should work cross-platform.
61
+
62
+
### Option 2: Manually (without Docker)
63
+
64
+
First, [install the Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html). Then run the following command:
65
+
66
+
```shell
67
+
$ npm run build:openssl
68
+
```
69
+
70
+
> This option may only work using Linux. It failed for us on macOS and we therefore recommend [Option 1: Using Docker](#option-1-using-docker).
53
71
54
72
55
-
## Docker Integration
73
+
## Running this project with Docker
56
74
57
75
The source code contains a [`Dockerfile`](/Dockerfile) which allows you to create ready-to-run [Docker](https://www.docker.com) images. These are comparable to snapshots in virtual machines.
58
76
@@ -77,7 +95,7 @@ You should now be able to view the OpenSSL Webterm at http://localhost:4300
77
95
78
96
## Contributing
79
97
80
-
Any contributions are **greatly appreciated**. If you have a suggestion that would make this better, please open an issue or fork the repository and create a pull request.
98
+
Any contributions are greatly appreciated. If you have a suggestion that would make this better, please open an issue or fork the repository and create a pull request.
0 commit comments