telar-embed 0.2.2

Embedding a separately-compiled Telar UI inside a Telar application: the guest half an embedded app exports, and the loader a host drives it through.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::*;

#[test]
fn the_table_starts_with_its_lifecycle_and_hashes_every_entry_with_what_it_takes() {
    platform_core::guest::check_entry_table::<EmbedEntries>();
    let due = EmbedEntries::LAYOUT
        .fields
        .iter()
        .find(|(field, _)| field.starts_with("next_timer_due:"))
        .expect("the timer entry is hashed");
    assert!(due.0.contains("Timestamp"), "{}", due.0);
}

#[test]
fn the_table_is_exported_under_the_symbol_its_host_reads() {
    assert_eq!(EmbedEntries::SYMBOL, b"telar_embed_entries\0");
}