{"id":16986258,"url":"https://github.com/eriksom/clipper2-wasm","last_synced_at":"2025-04-05T05:10:18.301Z","repository":{"id":214328357,"uuid":"734072730","full_name":"ErikSom/Clipper2-WASM","owner":"ErikSom","description":"WASM port of Clipper 2 for Polygon Clipping and Offsetting","archived":false,"fork":false,"pushed_at":"2024-12-07T10:01:40.000Z","size":344,"stargazers_count":64,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T10:41:35.924Z","etag":null,"topics":["boolean-operations","polygon-clipping","polygon-offsetting","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ErikSom.png","metadata":{"files":{"readme":"README.dev.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-20T19:54:54.000Z","updated_at":"2025-03-17T20:53:39.000Z","dependencies_parsed_at":"2024-12-27T09:15:32.299Z","dependency_job_id":null,"html_url":"https://github.com/ErikSom/Clipper2-WASM","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"d142a1b7c9ff636cf5bc8752b59b85a2c0c5bae5"},"previous_names":["eriksom/clipper2-wasm"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikSom%2FClipper2-WASM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikSom%2FClipper2-WASM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikSom%2FClipper2-WASM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ErikSom%2FClipper2-WASM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ErikSom","download_url":"https://codeload.github.com/ErikSom/Clipper2-WASM/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289429,"owners_count":20914464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boolean-operations","polygon-clipping","polygon-offsetting","wasm","webassembly"],"created_at":"2024-10-14T02:45:12.063Z","updated_at":"2025-04-05T05:10:18.275Z","avatar_url":"https://github.com/ErikSom.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Clipper2 WASM Development Guide\n\n## Introduction\nThis guide provides step-by-step instructions for setting up and building the Clipper2 WebAssembly (WASM) module.\n\n## Prerequisites\nBefore you begin, ensure you have the following prerequisites installed on your system:\n- Emscripten: Follow the installation steps detailed [here](https://emscripten.org/docs/getting_started/downloads.html).\n  - **Important**: Remember to install any dependencies and source the environment variables as described in the guide.\n\n## Building Clipper2 WASM\n\n### Step 1: Prepare the Environment\nChange into the C++ directory:\n```bash\ncd clipper2/CPP\n```\n\n### Step 2: Create a Build Directory\nSet up a build directory for out-of-source builds:\n```bash\nmkdir build\ncd build\n```\n\n### Step 3: Generate Build Files\nUse `emcmake` with `cmake` to generate the necessary build files:\n```bash\nemcmake cmake ../ \\\n-DCMAKE_BUILD_TYPE=Release \\\n-DCMAKE_CXX_FLAGS_RELEASE=\"-O3\" \\\n-DCLIPPER2_HI_PRECISION=OFF\n```\n\n### Step 4: Build the Library\nCompile the library files using `emmake`:\n```bash\nemmake make\n```\nThis step will create `libClipper2.a` and `libClipper2Z.a` library files.\n\n### Step 5: Compile WebAssembly Module\nReturn to the root directory and run the WebAssembly compilation script:\n```bash\ncd ..\nsh clipper2-wasm/compile-wasm.sh prod\n```\n\n### Completion\nAfter completing these steps, you will find the WASM builds in the `clipper2-wasm/dist` directory.\n\n### Generating typescript files\nAppend `--embind-emit-tsd ../clipper2z.d.ts` to the ES6 export, manually add the Factory export and the glue-stub functions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriksom%2Fclipper2-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feriksom%2Fclipper2-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriksom%2Fclipper2-wasm/lists"}