Skip to content

Add macro export_cycle_scope_names in ere-platform-zisk#289

Draft
han0110 wants to merge 1 commit intomasterfrom
han/feature/zisk-cycle-scope-name
Draft

Add macro export_cycle_scope_names in ere-platform-zisk#289
han0110 wants to merge 1 commit intomasterfrom
han/feature/zisk-cycle-scope-name

Conversation

@han0110
Copy link
Collaborator

@han0110 han0110 commented Feb 7, 2026

For ziskemu to display human-readable cycle scopes, we can do:

// main.rs

#![no_main]

use ere_platform_zisk::{export_cycle_scope_names, ziskos, ZiskPlatform};

ziskos::entrypoint!(main);

fn main() {
    Guest::run::<ZiskPlatform>();

    export_cycle_scope_names!(
        cycle_scope_a,
        cycle_scope_b,
        cycle_scope_c,
        cycle_scope_d,
        cycle_scope_e,
    );
}

To make sure it matches what's registered during Guest::run, we can enable the feature check-cycle-scope of ere-platform-zisk like:

# Cargo.toml

ere-platform-zisk = { workspace = true, features = ["check-cycle-scope"] }

If the names in export_cycle_scope_names!(...) mismatch the actual registered ones, panic message like the following will be displayed (for copy-paste to main.rs):

Cycle scope names mismatch with the registered entries, expect:

export_cycle_scope_names!(
    cycle_scope_f,
    cycle_scope_g,
    cycle_scope_h,
    cycle_scope_i,
    cycle_scope_j,
);

@han0110 han0110 force-pushed the han/feature/zisk-cycle-scope-name branch from 419ce55 to 2561245 Compare February 7, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant