Skip to content

Commit

Permalink
extended docs (#935)
Browse files Browse the repository at this point in the history
* extended docs

* extended docs
  • Loading branch information
DerThorsten authored May 10, 2024
1 parent 3d74180 commit ebc5e6e
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 3 deletions.
76 changes: 75 additions & 1 deletion docs/adding_packages.md
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)
8 changes: 7 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@ markdown_extensions:
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.superfences
- pymdownx.superfences




plugins:
- search
3 changes: 2 additions & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ cmd = [
python = "3.11.*"
mkdocs = ">=1.6.0"
mkdocs-material = ">=9.5.2"
pip = "*"


[feature.feature_documentation.tasks.docs-serve]
cmd = ["mkdocs", "serve"]

[feature.feature_documentation.tasks.docs-build]
cmd = ["mkdocs", "build"]


############################################
# environments
############################################
Expand Down

0 comments on commit ebc5e6e

Please sign in to comment.