Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build release .wasm with debug symbols #5708

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/contrib_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
with:
command: run
# We build in release so that we can reuse the results for actual publishing, if necessary
args: --locked -p re_build_web_viewer -- --release
args: --locked -p re_build_web_viewer -- --release -g

toml-lints:
name: Lint TOML files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_and_upload_rerun_cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
- name: Build web-viewer (release)
shell: bash
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

# This does not run in the pixi environment, doing so
# causes it to select the wrong compiler on macos-arm64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
if [ ${{ inputs.CHANNEL }} = "nightly" ]; then
export DEFAULT_EXAMPLES_MANIFEST_URL="https://app.rerun.io/version/nightly/examples_manifest.json"
fi
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

# We build a single manifest pointing to the `commit`
# All the `pr`, `main`, release tag, etc. variants will always just point to the resolved commit
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_checks_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Build web-viewer (release)
shell: bash
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

- name: Rust checks & tests
if: ${{ !inputs.ALL_CHECKS }}
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Build web-viewer (release)
shell: bash
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

# ---------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_publish_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Build web-viewer (release)
shell: bash
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

- name: Build examples
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_release_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build web-viewer (release)
shell: bash
run: |
pixi run cargo run --locked -p re_build_web_viewer -- --release
pixi run cargo run --locked -p re_build_web_viewer -- --release -g

- name: Publish
shell: bash
Expand Down
6 changes: 3 additions & 3 deletions crates/re_build_web_viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ This is also called by the `build.rs` of `re_web_viewer_server`.

```
cargo r -p re_build_web_viewer -- --debug
````
```

```
cargo r -p re_build_web_viewer -- --release
````
cargo r -p re_build_web_viewer -- --release -g
```
4 changes: 2 additions & 2 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ rerun-web-release = { cmd = "cargo run --package rerun-cli --no-default-features
"rerun-build-web-release",
] }

# Compile the web-viewer wasm in release mode, doe not include the cli.
# Compile the web-viewer wasm in release mode.
#
# This installs the `wasm32-unknown-unknown` rust target if it's not already installed.
# (this looks heavy but takes typically below 0.1s!)
rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_build_web_viewer -- --release"
rerun-build-web-release = "rustup target add wasm32-unknown-unknown && cargo run -p re_build_web_viewer -- --release -g"


build-examples = "cargo run -q --locked -p re_build_examples --"
Expand Down
4 changes: 2 additions & 2 deletions rerun_js/web-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"scripts": {
"build:wasm": "cargo run -p re_build_web_viewer -- --release --module -o rerun_js/web-viewer",
"build:wasm": "cargo run -p re_build_web_viewer -- --release -g --module -o rerun_js/web-viewer",
"build:wasm:debug": "cargo run -p re_build_web_viewer -- --debug --module -o rerun_js/web-viewer",
"build:types": "tsc --noEmit && dts-buddy",
"build": "npm run build:wasm && npm run build:types"
Expand Down Expand Up @@ -53,4 +53,4 @@
"dts-buddy": "^0.3.0",
"typescript": "^5.2.2"
}
}
}
2 changes: 1 addition & 1 deletion scripts/ci/build_and_upload_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def build_and_upload(bucket: Bucket, mode: BuildMode, gcs_dir: str, target: str,

if mode is BuildMode.PYPI:
# Only build web viewer when publishing to pypi
run("pixi run cargo run --locked -p re_build_web_viewer -- --release")
run("pixi run cargo run --locked -p re_build_web_viewer -- --release -g")
maturin_feature_flags = "--no-default-features --features pypi"
elif mode is BuildMode.PR:
maturin_feature_flags = "--no-default-features --features extension-module"
Expand Down
2 changes: 1 addition & 1 deletion web_viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ This folder contains the files required for the web viewer app.

You can build the web viewer with:

`cargo r -p re_build_web_viewer -- --release`
`cargo r -p re_build_web_viewer -- --release -g`
Loading