Spike, not the final UI: it answers whether flare-ui can drive Alkane OS's on-box pages, and what it costs. What works: - schema/alkane-bb.json authors the sidebar as data (3 sections, 14 tabs); - src/bin/ui-spike.rs renders it through flare_ui::nav + flare_ui::shell, so the unified sidebar, ordering and surface filtering come from the schema rather than from hand-written HTML; - the render uses the shared bf- design tokens, the same ones the rest of the suite uses. Size, measured rather than assumed (armv7, release, stripped): ui-baseline 323 KiB (maud + serde_json, no flare-ui) ui-spike 771 KiB (flare-ui + wschema + sha2) marginal 448 KiB Vendoring: third-party/flare-ui is the full v0.2.9 tree pinned in flare-ui/flare-ui.lock (a partial archive does not compile, since the crate include_str!s assets from dash-editor/). vendor/ is re-generated as a cargo directory source with the new registry dependencies (maud, sha2, typenum, digest, generic-array, block-buffer, crypto-common, cfg-if, etc.) so the build still works offline. third-party/README.md records how to re-pin.
55 lines
2.1 KiB
Bash
55 lines
2.1 KiB
Bash
#!/usr/bin/env bash
|
|
#
|
|
# Copyright 2026 The Fuchsia Authors
|
|
#
|
|
# Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
|
|
# <LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
|
|
# license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
|
|
# This file may not be copied, modified, or distributed except according to
|
|
# those terms.
|
|
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
|
|
# Check that both package archives contain unmodified copies of every license
|
|
# and SPDX headers in production sources and the rustdoc stylesheet.
|
|
# Excluding the lockfile permits packaging before a new derive version is
|
|
# available from the registry.
|
|
./cargo.sh +stable package --allow-dirty --no-verify \
|
|
--exclude-lockfile --registry crates-io \
|
|
--package zerocopy --package zerocopy-derive
|
|
metadata=$(./cargo.sh +stable metadata --no-deps --format-version 1)
|
|
|
|
target_dir=$(jq -r '.target_directory' <<< "$metadata")
|
|
for crate in zerocopy zerocopy-derive; do
|
|
version=$(jq -r --arg crate "$crate" \
|
|
'.packages[] | select(.name == $crate) | .version' <<< "$metadata")
|
|
archive="$target_dir/package/$crate-$version.crate"
|
|
|
|
for license in LICENSE-APACHE LICENSE-BSD LICENSE-MIT; do
|
|
tar -xOzf "$archive" "$crate-$version/$license" | cmp - "../$license"
|
|
done
|
|
|
|
packaged_files=$(tar -tzf "$archive")
|
|
while IFS= read -r file; do
|
|
path=${file#"$crate-$version/"}
|
|
case "$path" in
|
|
# Derive-output tests include generated Rust snapshots, not production
|
|
# sources. Other test fixtures, benchmarks, and metadata are out of scope.
|
|
src/output_tests/*) continue ;;
|
|
src/*.rs|build.rs|rustdoc/style.css) ;;
|
|
*) continue ;;
|
|
esac
|
|
|
|
# Do not use grep -q: reading the entire stream avoids a SIGPIPE in tar
|
|
# when a header matches before the end of a large file.
|
|
if ! tar -xOzf "$archive" "$file" | \
|
|
grep -Fx -e '// SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0 OR MIT' \
|
|
-e '/* SPDX-License-Identifier: BSD-2-Clause OR Apache-2.0 OR MIT */' \
|
|
> /dev/null; then
|
|
echo "Missing SPDX license header: $file" >&2
|
|
exit 1
|
|
fi
|
|
done <<< "$packaged_files"
|
|
done
|