Skip to content

Commit ec08d77

Browse files
committed
ADD: (CONTRIBUTING.md) added text about compiling/build
1 parent 5e8782b commit ec08d77

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/).
3+
4+
## Compiling for WASM
5+
6+
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/)
7+
8+
```bash
9+
wasm-pack build --target web --no-default-features
10+
```
11+
12+
Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following
13+
command:
14+
15+
```bash
16+
cargo make wasm
17+
```
18+
19+
### Running the WASM example
20+
21+
There is a [`index.html`] file for testing the WASM module in a navigator.
22+
23+
For security reasons, you need to run it from a server.
24+
You can start a Python server with the following command:
25+
26+
```bash
27+
python3 -m http.server
28+
```
29+
30+
The server will automatically serve the `index.html` file in the current directory.
31+
32+
33+
## Build for npm
34+
35+
```
36+
cargo make wasm_bundle
37+
```
38+
39+
This will create a npm bundler package in pkg-bundler

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,6 @@ let point = new Proj.Point(2.0, 1.0, 0.0);
9999
Proj.transform(from, to, point);
100100
```
101101

102+
## Contributing
102103

104+
You can contribute to this library by going on the [proj4rs](https://github.com/3liz/proj4rs/) repository

0 commit comments

Comments
 (0)