|
1 | 1 | <div align="center"> |
2 | 2 | <a href="https://cpp.js.org"> |
3 | 3 | <picture> |
4 | | - <img alt="Next.js logo" src="https://cpp.js.org/img/logo.png" height="128"> |
| 4 | + <img alt="Cpp.js logo" src="https://cpp.js.org/img/logo.png" height="128"> |
5 | 5 | </picture> |
6 | 6 | </a> |
7 | 7 | <h1>Cpp.js</h1> |
|
10 | 10 | WebAssembly & React Native |
11 | 11 | </p> |
12 | 12 |
|
13 | | -<a href="https://www.npmjs.com/package/cpp.js"><img alt="NPM version" src="https://img.shields.io/npm/v/cpp.js?style=for-the-badge" /></a> |
| 13 | +<a href="https://www.npmjs.com/package/cpp.js/v/beta"><img alt="NPM version" src="https://img.shields.io/npm/v/cpp.js/beta?style=for-the-badge&label=npm" /></a> |
| 14 | +<a href="https://hub.docker.com/r/bugra9/cpp.js"><img alt="Docker image version" src="https://img.shields.io/docker/v/bugra9/cpp.js?style=for-the-badge&logo=docker&label=docker" /></a> |
14 | 15 | <a href="https://github.com/bugra9/cpp.js/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/bugra9/cpp.js?style=for-the-badge" /></a> |
15 | | -<a href="https://github.com/bugra9/cpp.js/discussions"><img alt="Discussions" src="https://img.shields.io/github/discussions/bugra9/cpp.js?style=for-the-badge" /></a> |
16 | | -<a href="https://github.com/bugra9/cpp.js/issues"><img alt="Issues" src="https://img.shields.io/github/issues/bugra9/cpp.js?style=for-the-badge" /></a> |
17 | 16 | <br /> |
18 | 17 | <img alt="CodeQL" src="https://img.shields.io/github/actions/workflow/status/bugra9/cpp.js/github-code-scanning/codeql?branch=main&style=for-the-badge&label=CodeQL"> |
19 | 18 | <img alt="Linux Build" src="https://img.shields.io/github/actions/workflow/status/bugra9/cpp.js/build-linux.yml?branch=main&style=for-the-badge&label=Linux%20Build"> |
|
22 | 21 | </div> |
23 | 22 |
|
24 | 23 | <h3 align="center"> |
25 | | - <a href="https://cpp.js.org/docs/guide/getting-started/introduction">Getting Started</a> |
| 24 | + <a href="https://cpp.js.org/docs/guide/getting-started/introduction"><strong>📖 Getting Started</strong></a> |
26 | 25 | <span> · </span> |
27 | 26 | <a href="https://cpp.js.org/docs/guide/integrate-into-existing-project/overview">Integrate Into Existing Project</a> |
28 | 27 | <span> · </span> |
|
31 | 30 | <a href="https://cpp.js.org/docs/package/package/showcase">Showcase</a> |
32 | 31 | </h3> |
33 | 32 |
|
| 33 | +## Why Cpp.js? |
| 34 | +- **No glue code** — write standard C++ headers; bindings are generated for you. |
| 35 | +- **Single source, multi-target** — the same C++ code runs in browsers, Node.js, iOS, and Android. |
| 36 | +- **Battle-tested libraries** — drop-in support for GDAL, GEOS, OpenSSL, SQLite, PROJ, and more. |
| 37 | +- **Bundler-agnostic** — first-class plugins for Vite, Rollup, Webpack, Metro, and React Native. |
| 38 | + |
| 39 | +## Prerequisites |
| 40 | +To begin building your project with Cpp.js, you'll first need to install a few dependencies: |
| 41 | + |
| 42 | +- Docker |
| 43 | +- Node.js version 22 or higher |
| 44 | +- CMake version 3.28 or higher (only required for Mobile development) |
| 45 | +- Xcode (only required for iOS development) |
| 46 | +- Cocoapods (only required for iOS development) |
| 47 | + |
| 48 | +## Create a New Project |
| 49 | +To set up a new cpp.js project with a minimal starter structure, execute the following command in your terminal: |
| 50 | +```sh |
| 51 | +npm create cpp.js@beta |
| 52 | +``` |
| 53 | + |
34 | 54 | ## Basic Usage |
35 | 55 | **src/index.js** |
36 | 56 | ```js |
@@ -63,22 +83,37 @@ public: |
63 | 83 | }; |
64 | 84 | ``` |
65 | 85 |
|
66 | | -## Prerequisites |
67 | | -To begin building your project with Cpp.js, you’ll first need to install a few dependencies: |
| 86 | +## Official Packages |
| 87 | +Officially maintained, prebuilt C++ libraries you can install as npm packages and use directly from JavaScript: |
68 | 88 |
|
69 | | -- Docker |
70 | | -- Node.js version 18 or higher |
71 | | -- CMake version 3.28 or higher (only required for Mobile development) |
72 | | -- Xcode (only required for iOS development) |
73 | | -- Cocoapods (only required for iOS development) |
| 89 | +| Package | Version | |
| 90 | +| --- | --- | |
| 91 | +| [@cpp.js/package-gdal](https://www.npmjs.com/package/@cpp.js/package-gdal) | 2.0.0-beta.12 | |
| 92 | +| [@cpp.js/package-geos](https://www.npmjs.com/package/@cpp.js/package-geos) | 2.0.0-beta.12 | |
| 93 | +| [@cpp.js/package-proj](https://www.npmjs.com/package/@cpp.js/package-proj) | 2.0.0-beta.12 | |
| 94 | +| [@cpp.js/package-spatialite](https://www.npmjs.com/package/@cpp.js/package-spatialite) | 2.0.0-beta.12 | |
| 95 | +| [@cpp.js/package-sqlite3](https://www.npmjs.com/package/@cpp.js/package-sqlite3) | 2.0.0-beta.12 | |
| 96 | +| [@cpp.js/package-openssl](https://www.npmjs.com/package/@cpp.js/package-openssl) | 2.0.0-beta.12 | |
| 97 | +| [@cpp.js/package-curl](https://www.npmjs.com/package/@cpp.js/package-curl) | 2.0.0-beta.12 | |
| 98 | +| [@cpp.js/package-tiff](https://www.npmjs.com/package/@cpp.js/package-tiff) | 2.0.0-beta.12 | |
| 99 | +| [@cpp.js/package-geotiff](https://www.npmjs.com/package/@cpp.js/package-geotiff) | 2.0.0-beta.12 | |
| 100 | +| [@cpp.js/package-webp](https://www.npmjs.com/package/@cpp.js/package-webp) | 2.0.0-beta.12 | |
| 101 | +| [@cpp.js/package-expat](https://www.npmjs.com/package/@cpp.js/package-expat) | 2.0.0-beta.12 | |
| 102 | +| [@cpp.js/package-iconv](https://www.npmjs.com/package/@cpp.js/package-iconv) | 2.0.0-beta.12 | |
| 103 | +| [@cpp.js/package-zlib](https://www.npmjs.com/package/@cpp.js/package-zlib) | 2.0.0-beta.12 | |
74 | 104 |
|
75 | | -## Create a New Project |
76 | | -To set up a new cpp.js project with a minimal starter structure, execute the following command in your terminal: |
77 | | -```sh |
78 | | -npm create cpp.js@latest |
79 | | -``` |
| 105 | +Browse all available packages at [cpp.js.org/docs/package/package/showcase](https://cpp.js.org/docs/package/package/showcase). |
| 106 | + |
| 107 | +## 🌱 Community Packages |
| 108 | +Community-maintained, prebuilt C++ libraries packaged for Cpp.js — published under the [cppjs-community](https://github.com/cppjs-community) organization. Anyone can contribute new packages following the same standard, and they'll be listed here. |
| 109 | + |
| 110 | +| Package | Repository | |
| 111 | +| --- | --- | |
| 112 | +| simdjson | [github.com/cppjs-community/package-simdjson](https://github.com/cppjs-community/package-simdjson) | |
| 113 | + |
| 114 | +Want to add yours? Start a discussion at [bugra9/cpp.js/discussions](https://github.com/bugra9/cpp.js/discussions). |
80 | 115 |
|
81 | 116 | ## License |
82 | 117 | [MIT](https://github.com/bugra9/cpp.js/blob/main/LICENSE) |
83 | 118 |
|
84 | | -Copyright (c) 2025, Buğra Sarı |
| 119 | +Copyright (c) 2026, Buğra Sarı |
0 commit comments