emscripten-core / emscripten-core/emscripten

There is no way to prepare emscripten HTML output for CGI

Open
#14,540 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

# build
```sh
emcc -ohello.html hello.c
```

## output
```html

```

# CGI
```sh
transform $resources/hello.html
```

# problem
This CGI script is placed into `cgi-bin` and, accordingly, `hello.js` is not there because it is in *resources*. It should not be in `cgi-bin` but I cannot find a way to tell `emcc` that it will be placed elsewhere. I would expect the following result:

## output
```html

```

The same problem applies to `hello.wasm` of course. Is there a work-around, short of creating an executable script for each resource to stream it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.