-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes after trying to run the cpp getting started guide (#4049)
### What A few more details around the pixi install and the CMAKE_PREFIX_PATH. Make the example code match minimal/main.cpp ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/4049) (if applicable) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG - [PR Build Summary](https://build.rerun.io/pr/4049) - [Docs preview](https://rerun.io/preview/74fc40be104594908cfc1d2e2e31da8900401eeb/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/74fc40be104594908cfc1d2e2e31da8900401eeb/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
- Loading branch information
Showing
7 changed files
with
103 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: Install arrow-cpp with pixi | ||
order: 6 | ||
--- | ||
[Pixi](https://prefix.dev/docs/pixi/overview) is a convenient tool for managing cross-platform project dependencies. In | ||
fact, Rerun uses it for our own internal development dependency management, and you will find `pixi.toml` files in most | ||
of our external examples. | ||
|
||
## Installing Pixi | ||
On Mac or Linux you can just run: | ||
``` | ||
curl -fsSL https://pixi.sh/install.sh | bash | ||
``` | ||
Or on Windows: | ||
``` | ||
iwr -useb https://pixi.sh/install.ps1 | iex | ||
``` | ||
|
||
Alternatively if you are already a `cargo` user, you can install `pixi` via: | ||
``` | ||
cargo install pixi | ||
``` | ||
|
||
See the [Pixi installation guide](https://prefix.dev/docs/pixi/overview#installation) for other installation options. | ||
|
||
## Adding Pixi to your own project | ||
|
||
If you want to use `pixi` to manage dependencies in your own project, you can simply run `pixi init` in the root of your | ||
project folder. This will create a `pixi.toml` file that manages the project. After that you can run | ||
`pixi add arrow-cpp==10.0.1` to add arrow-cpp as a dependency to your project. | ||
|
||
Now, any pixi tasks added to your project will have access to the `arrow-cpp` library. | ||
|
||
Even without tasks, you can run `pixi shell` to create a shell environment where all your project dependencies | ||
(including `arrow-cpp`) will be available. You can use this `pixi shell` to run you project's build commands. | ||
|
||
Check out the [pixi docs](https://prefix.dev/docs/pixi/basic_usage) for more information on what you can do with pixi. | ||
|
||
## Using a global install of arrow-cpp | ||
|
||
If you're not ready to use pixi for your project, you can still use it to install `arrow-cpp` globally by running | ||
`pixi global install arrow-cpp`. However, in this case you will need to also tell `cmake` how to find the packages: | ||
```bash | ||
export CMAKE_PREFIX_PATH=$HOME/.pixi/envs/arrow-cpp:$CMAKE_PREFIX_PATH | ||
``` | ||
|
||
## Pixi in action | ||
|
||
The rerun-cpp example: <https://github.com/rerun-io/cpp-example-opencv-eigen> ships with a `pixi.toml` file to manage | ||
its dependencies, as well as a set of tasks to simplify running it. | ||
|
||
If you have pixi installed, all you need to do to run the example is: | ||
``` | ||
git clone https://github.com/rerun-io/cpp-example-opencv-eigen | ||
cd cpp-example-opencv-eigen | ||
pixi run example | ||
``` | ||
|
||
## Known Issues | ||
|
||
⚠️ [#4050](https://github.com/rerun-io/rerun/issues/4050) `arrow-cpp` needs to be held back to 10.0.1 to avoid conflicts | ||
with the `rerun-sdk` package when installed in the same pixi environment. | ||
|
||
⚠️ On Windows pixi only downloads release binaries which are **not** compatible with debug builds, causing runtime crashes. For debug builds you have to build Arrow yourself, see [Building Arrow C++](https://arrow.apache.org/docs/developers/cpp/building.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: C++ Custom Component Batch Adapter | ||
order: 6 | ||
order: 7 | ||
# TODO(#3962): update link | ||
redirect: https://github.com/rerun-io/rerun/blob/6b2cf6dbf29124a10f2fc909e02f5fee7cbd0cbe/examples/cpp/custom_component_adapter/README.md | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"node_modules/**" | ||
], | ||
"ignoreWords": [ | ||
"-useb", | ||
"aarch", | ||
"abey", | ||
"adrr", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters