|
1 |
| -# cpp.js |
2 |
| - |
3 |
| -cpp.js is a framework for building tiny, blazingly fast binaries for all major desktop, mobile and web platforms. Developers can integrate any front-end framework that compiles to HTML, JS and CSS for building their user interface. The backend of the application is a cpp-sourced binary with an API that the front-end can interact with. |
4 |
| - |
5 |
| -## Motivation |
6 |
| -**js:** |
7 |
| -- You can output to all platforms with a single source. |
8 |
| -- Easy ui development |
9 |
| -- Slowly |
10 |
| - |
11 |
| -**c++:** |
12 |
| -- You can output to all platforms with a single source. |
13 |
| -- Native performance |
14 |
| - |
15 |
| -**js + c++** |
16 |
| -- You can output to all platforms with a single source. |
17 |
| -- Easy ui development |
18 |
| -- Native performance |
19 |
| - |
20 |
| -Using javascript and react native, we can create applications for android, ios, web and desktops with a single source. But application performance remains low. Can we overcome this problem by adding c++ next to javascript and developing the main code with c++ and the ui side with javascript? |
21 |
| - |
22 |
| -## Guide |
23 |
| -### Installation |
24 |
| -- Install and start docker. Add user to docker group. |
25 |
| -- Install plugin according to the builder used. (rollup-plugin-cppjs, vite-plugin-cppjs) |
26 |
| -- Add plugin to builder config. (e.g: vite.config.js) |
27 |
| - |
28 |
| -### Basic Usage |
29 |
| -- Create native folder in the project root. |
30 |
| -- Create .h and .cpp files as you like. |
31 |
| -- If you want to use a library, just install it. (e.g: yarn add cppjs-lib-sample-web) |
32 |
| - |
33 |
| -Check out the [Vue Sample app (Vite + Rollup)](https://github.com/bugra9/cpp.js/tree/main/samples/cppjs-sample-vue-vite). |
34 |
| -Check out the [React Sample app (CRA + Webpack)](https://github.com/bugra9/cpp.js/tree/main/samples/cppjs-sample-react-cra). |
35 |
| - |
36 |
| -## TODO |
37 |
| - |
38 |
| -### Urgent |
39 |
| -- [x] Implement swig-emscripten integration |
40 |
| -- [x] Add overloading support using parameter types for embind |
41 |
| -- [x] Crete and upload docker image |
42 |
| -- [x] Implement swig interface generator |
43 |
| -- [x] Implement cpp-js bridge file generator |
44 |
| -- [x] Implement wasm generator |
45 |
| -- [x] Create rollup plugin |
46 |
| -- [x] Create vite plugin for development |
47 |
| -- [x] Create webpack plugin |
48 |
| -- [ ] Create turbopack plugin |
49 |
| -- [x] Create vite + vue example |
50 |
| -- [ ] Create vite + react example |
51 |
| -- [x] Create webpack + react example |
52 |
| -- [ ] Handle other cpp formats (h, hpp, hh, c, cpp, cc, cxx) |
53 |
| -- [ ] Use user defined interface file if available. |
54 |
| -- [x] Use user defined CMakeLists.txt if available. |
55 |
| -- [ ] Implement Hot Module Replacement (HMR) for the Vite plugin. |
56 |
| -- [ ] Implement Hot Module Replacement (HMR) for the Webpack plugin. |
57 |
| - |
58 |
| -### Important |
59 |
| -- [ ] Implement swig-jsi integration |
60 |
| -- [ ] Implement cpp-jsi bridge file generator |
61 |
| -- [ ] Implement React Native integration |
62 |
| -- [ ] Implement cpp-node bridge file generator |
63 |
| -- [ ] Implement Electron integration |
64 |
| -- [ ] Create documentation |
65 |
| - |
66 |
| -### Libs |
67 |
| -- [ ] Create CartoMobileSDK cppjs web library |
68 |
| -- [ ] Create gdal3.js cppjs web library |
0 commit comments