-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
84 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,77 @@ | ||
# Adding packages | ||
|
||
To add a new package to emscripten-forge, just create a Pull Request in this repository. | ||
To add a new package to emscripten-forge, just create a Pull Request in this repository. | ||
|
||
|
||
|
||
# C/C++ Packages | ||
## CMake | ||
|
||
Adding cmake based packages is easy. Usually it is enough to replace the `cmake` command with the `emcmake` command and | ||
`make` with `emmake` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details) | ||
|
||
|
||
|
||
**Example recipes**: | ||
|
||
* [xeus](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/xeus) | ||
* [xeus-javascript](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/xeus-javascript) | ||
* [sqlitecpp](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/sqlitecpp) | ||
|
||
## Configure / Make | ||
|
||
Usually it is enough to replace the `./configure` command with the `emconfigure ./configure` (see the [emscripten documentation](https://emscripten.org/docs/compiling/Building-Projects.html#integrating-with-a-build-system) for more details) | ||
|
||
|
||
# Python Packages | ||
|
||
## pip / setuptools | ||
For simple package only these requirements are usually necessary: | ||
```yaml | ||
|
||
requirements: | ||
build: | ||
- python | ||
- cross-python_${{target_platform}} | ||
- ${{ compiler("c") }} | ||
- pip | ||
host: | ||
- python | ||
run: | ||
- python | ||
``` | ||
**Example recipes**: | ||
* [regex](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/regex) | ||
### Example recipes | ||
## rust | ||
Building rust package with PyO3 / maturin works usually out of the box. | ||
For a maturin / cffi / pyo3 package, the following requirements are usually necessary: | ||
```yaml | ||
requirements: | ||
build: | ||
- cross-python_${{target_platform}} | ||
- cffi == 1.15.1 (# at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) | ||
- setuptools-rust | ||
- rust | ||
- maturin | ||
|
||
host: | ||
- python | ||
# at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) | ||
- cffi == 1.15.1 | ||
run: | ||
# at the time of writing pinning cffi == 1.15.1 is necessary, may change in the future) | ||
- cffi == 1.15.1 | ||
``` | ||
**Example recipes**: | ||
* [cryptography](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/cryptography) | ||
* [pydantic-core](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/cryptography) | ||
* [pycrdt](https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/pycrdt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters