Skip to content

Commit

Permalink
Release 0.2.0 alpha.8 (rerun-io#1304)
Browse files Browse the repository at this point in the history
* Make our web builds cleaner

* Bump to 0.2.0-alpha.8

* Explain some things

* clippy
  • Loading branch information
emilk authored Feb 14, 2023
1 parent 2e628c4 commit 2bd55a6
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 53 deletions.
58 changes: 29 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ include = ["../../LICENSE-APACHE", "../../LICENSE-MIT", "**/*.rs", "Cargo.toml"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rerun-io/rerun"
rust-version = "1.67"
version = "0.2.0-alpha.5"
version = "0.2.0-alpha.8"

[workspace.dependencies]
re_analytics = { path = "crates/re_analytics", version = "0.2.0-alpha.5" }
re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.0-alpha.5" }
re_data_store = { path = "crates/re_data_store", version = "0.2.0-alpha.5" }
re_error = { path = "crates/re_error", version = "0.2.0-alpha.5" }
re_format = { path = "crates/re_format", version = "0.2.0-alpha.5" }
re_log = { path = "crates/re_log", version = "0.2.0-alpha.5" }
re_log_types = { path = "crates/re_log_types", version = "0.2.0-alpha.5" }
re_memory = { path = "crates/re_memory", version = "0.2.0-alpha.5" }
re_query = { path = "crates/re_query", version = "0.2.0-alpha.5" }
re_renderer = { path = "crates/re_renderer", version = "0.2.0-alpha.5" }
re_sdk = { path = "crates/re_sdk", version = "0.2.0-alpha.5" }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.0-alpha.5" }
re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.0-alpha.5" }
re_string_interner = { path = "crates/re_string_interner", version = "0.2.0-alpha.5" }
re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.0-alpha.5" }
re_tuid = { path = "crates/re_tuid", version = "0.2.0-alpha.5" }
re_ui = { path = "crates/re_ui", version = "0.2.0-alpha.5" }
re_viewer = { path = "crates/re_viewer", version = "0.2.0-alpha.5" }
re_web_server = { path = "crates/re_web_server", version = "0.2.0-alpha.5" }
re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.0-alpha.5" }
rerun = { path = "crates/rerun", version = "0.2.0-alpha.5" }
re_analytics = { path = "crates/re_analytics", version = "0.2.0-alpha.8" }
re_arrow_store = { path = "crates/re_arrow_store", version = "0.2.0-alpha.8" }
re_data_store = { path = "crates/re_data_store", version = "0.2.0-alpha.8" }
re_error = { path = "crates/re_error", version = "0.2.0-alpha.8" }
re_format = { path = "crates/re_format", version = "0.2.0-alpha.8" }
re_log = { path = "crates/re_log", version = "0.2.0-alpha.8" }
re_log_types = { path = "crates/re_log_types", version = "0.2.0-alpha.8" }
re_memory = { path = "crates/re_memory", version = "0.2.0-alpha.8" }
re_query = { path = "crates/re_query", version = "0.2.0-alpha.8" }
re_renderer = { path = "crates/re_renderer", version = "0.2.0-alpha.8" }
re_sdk = { path = "crates/re_sdk", version = "0.2.0-alpha.8" }
re_sdk_comms = { path = "crates/re_sdk_comms", version = "0.2.0-alpha.8" }
re_smart_channel = { path = "crates/re_smart_channel", version = "0.2.0-alpha.8" }
re_string_interner = { path = "crates/re_string_interner", version = "0.2.0-alpha.8" }
re_tensor_ops = { path = "crates/re_tensor_ops", version = "0.2.0-alpha.8" }
re_tuid = { path = "crates/re_tuid", version = "0.2.0-alpha.8" }
re_ui = { path = "crates/re_ui", version = "0.2.0-alpha.8" }
re_viewer = { path = "crates/re_viewer", version = "0.2.0-alpha.8" }
re_web_server = { path = "crates/re_web_server", version = "0.2.0-alpha.8" }
re_ws_comms = { path = "crates/re_ws_comms", version = "0.2.0-alpha.8" }
rerun = { path = "crates/rerun", version = "0.2.0-alpha.8" }

anyhow = "1.0"
arrow2 = "0.16"
Expand Down
5 changes: 5 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,9 @@ First login as https://crates.io/users/rerunio with and API key you get from Emi
cargo login $API_KEY
```

-----------------------------------------------------------------------------------------------
!! IMPORTANT !! Shut off VSCode, and don't touch anything while `publish_crates.sh` is running!
!! IMPORTANT !! Read `publish_crates.sh` for details
-----------------------------------------------------------------------------------------------

./scripts/publish_crates.sh --execute
3 changes: 3 additions & 0 deletions crates/re_web_server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,11 @@ fn build_web() {
std::env!("CARGO_MANIFEST_DIR")
);

// Clean previous version of what we are building:
let wasm_path = Path::new(&build_dir).join([crate_name, "_bg.wasm"].concat());
fs::remove_file(wasm_path.clone()).ok();
let js_path = Path::new(&build_dir).join([crate_name, ".js"].concat());
fs::remove_file(js_path).ok();

let metadata = MetadataCommand::new()
.manifest_path("./Cargo.toml")
Expand Down
3 changes: 2 additions & 1 deletion scripts/build_web.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ export CARGO_ENCODED_RUSTFLAGS=""

# Clear output from old stuff:
rm -f ${BUILD_DIR}/${CRATE_NAME_SNAKE_CASE}_bg.wasm
rm -f ${BUILD_DIR}/${CRATE_NAME_SNAKE_CASE}.js

TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory`

# re_web_server/build.rs calls this scripts, so we need to use
# a different target folder to support recursive caergo builds.
# a different target folder to support recursive cargo builds.
TARGET_WASM="${TARGET}_wasm"

echo "Compiling rust to wasm in folder: ${TARGET_WASM}"
Expand Down
14 changes: 13 additions & 1 deletion scripts/publish_crates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,20 @@ echo $FLAGS

set -x

# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish re_web_server:
# IMPORTANT! we need to build an optimized .wasm that will be bundled when we publish re_web_server.
# This wasm is built by `re_viewer/build.rs`, which is brittle af. We need to fix ASAP.
# Why so brittle? Because running `cargo check` or having Rust Analyzer running will run
# that build.rs, which will change the built `.wasm` file while this publish script is running.
# SUPER BAD! We need to fix this ASAP, but it is the night before our first release public
# release and I'm tired. Will fix later, mkay?
echo "MAKE SURE RUST ANALYZER IS OFF!"
rm -rf target_wasm # force clean build
rm -f web_viewer/re_viewer_bg.wasm
rm -f web_viewer/re_viewer.js
touch crates/re_viewer/src/lib.rs # force recompile of web server
cargo build --release -p re_web_server
# scripts/build_web.sh --release # alternative


# Some of build.rs scripts checks this env-var:
export RERUN_IS_PUBLISHING=yes
Expand Down

0 comments on commit 2bd55a6

Please sign in to comment.