-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from neo-garaix/dev
Update readme
- Loading branch information
Showing
4 changed files
with
57 additions
and
36 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/). | ||
|
||
# Contributing | ||
|
||
### Modify | ||
|
||
Any Rust file you wish to modify can be found in `src/` with some tests in `tests/proj4js_tests.rs`. | ||
In order to test your new code, you need to build it thanks to WASM. More information on how to build it can be found in [README_WASM.md](./README_WASM.md). | ||
|
||
### Test | ||
|
||
If you want to test your code, you can ron locally some demos by reading [this README](./ol-proj4rs-demo-app/README.md) in `ol-proj4rs-demo-app/`. | ||
You can create another demo page with a HTML file + JavaScript file combo. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
The documentation is available on [docs.rs](https://docs.rs/proj4rs/) and the demo on [docs.3liz.org](https://docs.3liz.org/proj4rs/). | ||
|
||
# Build locally a package | ||
|
||
## Compiling for WASM | ||
|
||
Install [wasm-pack](https://rustwasm.github.io/wasm-pack/book/) | ||
|
||
```bash | ||
wasm-pack build --target web --no-default-features | ||
``` | ||
|
||
Or if you have installed [cargo-make](https://sagiegurari.github.io/cargo-make/), use the following | ||
command: | ||
|
||
```bash | ||
cargo make wasm | ||
``` | ||
|
||
### Running the WASM example | ||
|
||
There is a `index.html` file for testing the WASM module in a navigator. | ||
|
||
For security reasons, you need to run it from a server. | ||
You can start a Python server with the following command: | ||
|
||
```bash | ||
python3 -m http.server | ||
``` | ||
|
||
The server will automatically serve the `index.html` file in the current directory. | ||
|
||
|
||
## Build for npm | ||
|
||
```bash | ||
cargo make wasm_bundle | ||
``` | ||
|
||
This will create a npm bundler package in pkg-bundler |
Binary file not shown.