Skip to content

Commit 41c302e

Browse files
committed
Documentations
1 parent c2652b6 commit 41c302e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+7454
-2091
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ max_line_length = 150
1212

1313
[*.md]
1414
trim_trailing_whitespace = false
15+
16+
[*.mdx]
17+
trim_trailing_whitespace = false

README.md

-68
Original file line numberDiff line numberDiff line change
@@ -1,68 +0,0 @@
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

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
2+
"scripts": {
3+
"docs:deploy": "push-dir --dir=website/build --branch=gh-pages --cleanup"
4+
},
25
"devDependencies": {
36
"cpp.js": "workspace:^",
4-
"prettier": "^2.6.2"
7+
"prettier": "^2.6.2",
8+
"push-dir": "^0.4.1"
59
}
610
}

0 commit comments

Comments
 (0)