// Uses IdProvider to allocate an address
let my_addr = allocate_address!(Component);
let my_resx = allocate_address!(Resource);
let foo = var!["my-foo"];
foo.whitelist_component(my_addr);
foo.whitelist_resource(my_resx);
let c = MyComponent::create_with_addresses(my_addr, my_resx);
foo.register(c);