You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/src/concepts/wasm-builds.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ CXX-Qt and applications written with it can be compiled for WebAssembly, with a
11
11
12
12
You will need to have Qt for WebAssembly installed. The next section shows versions that have been tested.
13
13
14
-
Additionally, if you haven't already, clone the `emsdk` git repo from [here](https://github.com/emscripten-core/emsdk).
14
+
Additionally, if you haven't already, clone the [`emsdk` git repo from Github](https://github.com/emscripten-core/emsdk).
15
15
16
16
## Using Correct Versions
17
17
@@ -200,4 +200,4 @@ error[E0433]: failed to resolve: use of undeclared type `IovLen`
200
200
201
201
`socket2` is a dependency of `async-io`, which is a dependency of `async-std`.
202
202
203
-
There is discussion around supporting wasm in the GitHub repository for `async-std`, and the progress is being tracked [here](https://github.com/async-rs/async-std/issues/220).
203
+
There is discussion around supporting wasm in the GitHub repository for `async-std`, and the progress is being tracked [in this issue](https://github.com/async-rs/async-std/issues/220).
Copy file name to clipboardExpand all lines: book/src/internals/build-system.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,21 +25,21 @@ We want to make the generated headers available, not just to CMake, but also wit
25
25
26
26
For this we need to export them to a stable directory so that both CMake and Cargo can find them.
27
27
28
-
# (Optional) Integration with CMake
28
+
###(Optional) Integration with CMake
29
29
30
30
Somehow, all of this should be compatible with both CMake, and Cargo-only builds.
31
31
32
-
# The plan (for now)
32
+
##The plan (for now)
33
33
34
34
After many rounds of refactoring this, we believe that we need to be able to share data between build scripts for this to work halfway ergonomically.
35
35
36
-
We want to use a similar approach to CXX, which uses Cargos `links` key to ensure a correct build order (see the documentation [here](https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key)).
36
+
We want to use a similar approach to CXX, which uses Cargos `links` key to ensure a correct build order (see the [links key documentation](https://doc.rust-lang.org/cargo/reference/build-scripts.html#the-links-manifest-key)).
37
37
When building with cxx-qt-build, you may simply specify that your code depends on another crate.
38
38
Cargo will then make sure that the build scripts of the dependencies have run **before** the build script of this crate.
39
39
40
40
We can additionally pass metadata between build scripts, which we use to find the `manifest.json` of each crate and the path to their "target" directory.
41
41
42
-
## The "target" directory
42
+
###The "target" directory
43
43
44
44
Each build script can export artifacts into a folder with a well-known layout.
45
45
It is also required to export a `manifest.json` file that tells downstream dependencies which of these artifacts to include and how to configure their own build.
@@ -68,7 +68,7 @@ Next to the crates directory, there should be a `qml_modules` directory, which c
68
68
69
69
Each module should include a `plugin_init.o`, `.qmltypes`, `qmldir`, and any other necessary files.
70
70
71
-
## Initializers with Cargo and CMake
71
+
###Initializers with Cargo and CMake
72
72
73
73
There are multiple ways to solve the issues presented by static initializers:
74
74
@@ -99,7 +99,7 @@ In CMake we mirror Qts behavior, which is to build the static initializer as an
99
99
The initializer functions themselves are still built into the Rust static library and the `OBJECT` library must therefore link to it.
100
100
This is taken care of by the `cxx_qt_import_crate`/`_import_qml_module` functions.
101
101
102
-
## Integration with CMake
102
+
###Integration with CMake
103
103
104
104
Via the `CXXQT_EXPORT_DIR` environment variable CMake should be able to change the location of the "target" directory.
105
105
CMake can then expect required artifacts to exist at pre-defined locations, which can be added as dependency, include directories, objects, etc. to the Crate target.
Copy file name to clipboardExpand all lines: book/src/internals/crate-organization.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ This page lays out the goal of each crate and how it is differentiated from the
20
20
-[🦾 `qt-build-utils` - Building with Qt](#qt-build-utils)
21
21
-[🤝 `cxx-qt-cmake` - Handoff to CMake](#cxx-qt-cmake)
22
22
23
-
# <aname="cxx-qt"></a>⭐ `cxx-qt` - The Star of the Show
23
+
##<aname="cxx-qt"></a>⭐ `cxx-qt` - The Star of the Show
24
24
25
25
The main crate of CXX-Qt.
26
26
@@ -39,7 +39,7 @@ Apart from a few extremely basic types that are needed for this goal, wrapping t
39
39
40
40
This should also allow `cxx-qt-lib` and `cxx-qt-lib-extras` to be used without the user needing to use the `cxx-qt` crate itself, which is why they're explicitly seperated.
41
41
42
-
# <aname="cxx-qt-build"></a> 👷 `cxx-qt-build` - The Construction Worker
42
+
##<aname="cxx-qt-build"></a> 👷 `cxx-qt-build` - The Construction Worker
43
43
44
44
`cxx-qt-build` provides the user-accessible API for building applications with CXX-Qt.
45
45
@@ -51,7 +51,7 @@ For CMake, it exposes the required artifacts into a well-known directory and str
51
51
52
52
The access to Qts build tooling has actually been made available as a separate crate: `qt-build-utils`, which `cxx-qt-build` uses internally
53
53
54
-
# <aname="cxx-qt-gen"></a> 💚 `cxx-qt-gen` - The Heart of CXX-Qt
54
+
##<aname="cxx-qt-gen"></a> 💚 `cxx-qt-gen` - The Heart of CXX-Qt
55
55
56
56
This crate contains the "main functionality" of CXX-Qt.
57
57
@@ -68,7 +68,7 @@ This transpiler is then used by the `#[cxx_qt::bridge]` macro via `cxx-qt-macro`
68
68
69
69
> TODO: Add a documentation of the cxx-qt-gen stages and architecture in a separate page
70
70
71
-
# <aname="cxx-qt-lib"></a> 📖 `cxx-qt-lib` - The "standard" Library
71
+
##<aname="cxx-qt-lib"></a> 📖 `cxx-qt-lib` - The "standard" Library
72
72
73
73
`cxx-qt-lib` is to `cxx-qt`, what Rusts `std` library is to `rustc`.
74
74
@@ -92,7 +92,7 @@ Additional types can be added into a separate, less maintained, crate (namely: `
92
92
93
93
This leads us to the concrete policy for including types in `cxx-qt-lib`:
94
94
95
-
## `cxx-qt-lib` inclusion policy
95
+
###`cxx-qt-lib` inclusion policy
96
96
97
97
- Default to adding anything you think may be useful to `cxx-qt-lib-extras`
98
98
- Only add types to `cxx-qt-lib` directly, if they're either:
@@ -101,7 +101,7 @@ This leads us to the concrete policy for including types in `cxx-qt-lib`:
101
101
102
102
We can then always promote types from -lib-extras to -lib, if/when it turns out this type is used regularly.
103
103
104
-
# <aname="cxx-qt-lib-extras"></a> 📚 `cxx-qt-lib-extras` - The Bookshelf
104
+
##<aname="cxx-qt-lib-extras"></a> 📚 `cxx-qt-lib-extras` - The Bookshelf
105
105
106
106
As mentioned in the `cxx-qt-lib` library, we do not aim to maintain wrappers for the entire Qt API.
107
107
However, it would still be useful to have a place where the community can share and collect bindings for whatever they have wrapped of the Qt API.
@@ -137,19 +137,19 @@ Simply copying individual files out of the crate into your own crate is also a r
137
137
138
138
We only ask that you contribute your own wrappers and fixes back to -lib-extras so the wider ecosystem can benefit.
139
139
140
-
# <aname="cxx-qt-macro"></a> 💻 `cxx-qt-macro` - Frontend for cxx-qt-gen
140
+
##<aname="cxx-qt-macro"></a> 💻 `cxx-qt-macro` - Frontend for cxx-qt-gen
141
141
142
142
For technical reasons within Cargo, procedural macros need to be a special type of crate.
143
143
144
144
`cxx-qt-macro` wraps the bridge macro, which is then re-exported by the `cxx-qt` crate.
145
145
146
-
# <aname="qt-build-utils"></a> 🦾 `qt-build-utils` - Building with Qt
146
+
##<aname="qt-build-utils"></a> 🦾 `qt-build-utils` - Building with Qt
147
147
148
148
This crate wraps Qts custom build tooling like moc.
149
149
150
150
It is mostly used by `cxx-qt-build`. But because it may be useful to other crates in the Qt ecosystem as well, we have decided to split it into its own crate.
151
151
152
-
# <aname="cxx-qt-cmake"></a> 🤝 [`cxx-qt-cmake`](https://github.com/kdab/cxx-qt-cmake) - Handoff to CMake
152
+
##<aname="cxx-qt-cmake"></a> 🤝 [`cxx-qt-cmake`](https://github.com/kdab/cxx-qt-cmake) - Handoff to CMake
153
153
154
154
Whilst this is not a crate, it's a separate "project", as it lives in another repository.
155
155
`cxx-qt-cmake` simply contains the bits of CMake code that encapsulate the integration of `cxx-qt-build` artifacts into CMake.
0 commit comments