Files
alkane-os/vendor/zerocopy-derive/tests/paths_and_modules.rs
T
x ad31cfbafa Vendor flare-ui v0.2.9 and prove the schema-driven UI in an image
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.
2026-11-04 14:06:25 -06:00

90 lines
2.0 KiB
Rust

// Copyright 2019 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.
// See comment in `include.rs` for why we disable the prelude.
#![no_implicit_prelude]
#![allow(warnings)]
include!("include.rs");
extern crate self as derive_path_test;
pub mod nested {
pub extern crate zerocopy_renamed as reexported_zerocopy;
}
// Ensure that types that are use'd and types that are referenced by path work.
macro_rules! test {
($crate_path:tt) => {
mod foo {
use super::*;
#[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)]
#[zerocopy(crate = $crate_path)]
#[repr(C)]
pub struct Foo {
foo: u8,
}
#[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)]
#[zerocopy(crate = $crate_path)]
#[repr(C)]
pub struct Bar {
bar: u8,
}
}
use self::foo::Foo;
#[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)]
#[zerocopy(crate = $crate_path)]
#[repr(C)]
struct Baz {
foo: Foo,
bar: foo::Bar,
}
};
}
test!("zerocopy_renamed");
mod root_relative {
use super::*;
test!("derive_path_test::nested::reexported_zerocopy");
}
mod crate_relative {
use super::*;
test!("crate::nested::reexported_zerocopy");
}
mod super_relative {
use super::*;
test!("super::nested::reexported_zerocopy");
}
mod self_super_relative {
use super::*;
test!("self::super::nested::reexported_zerocopy");
}
mod super_super_relative {
use super::*;
mod inner {
use super::*;
test!("super::super::nested::reexported_zerocopy");
}
}