ordinary_lifetime_scope_io.bend relies on unsafe/foreign
raw source on the hub · import bendvy-ecs-core@0.1.0.7/ordinary_lifetime_scope_io.bend as Ordinary_lifetime_scope_io
7 imports
import Base import ./ordinary_lifetime_scope.bend as Ord import ./lifetime_scope.bend as Sc import ./world_io.bend as IOCreate import ./ordinary_schema_provision.bend as Provision import ./world.bend as W import ./relation_commands.bend as A
Templates
template created source · line 10 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-empty:(@_:Unit -> C) -> @-count:(@_:C -> @_:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> @-E:Data -> @value:0x7e321819d0ff210531780719c7674cef/ordinary_schema_provision.Provision<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.empty_store(S, C, empty), 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.count_store(S, C, count)> -> @result:0x7e321819d0ff210531780719c7674cef/world_io.Creation<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/relation_commands.Notice<S, E>> -> IO(Pair(0x7e321819d0ff210531780719c7674cef/ordinary_schema_provision.Provision<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.empty_store(S, C, empty), 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.count_store(S, C, count)>, 0x7e321819d0ff210531780719c7674cef/world_io.Creation<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/relation_commands.Notice<S, E>>))
Canonical IO creation remains foreign execution, never a mathematical proof.
template create source · line 22 · raw
@-S:Data -> @-C:Type -> @-R:Type -> @-empty:(@_:Unit -> C) -> @-count:(@_:C -> @_:List<&2, 0x7e321819d0ff210531780719c7674cef/world.Handle<S>> -> Pair(C, List<&2, Maybe<&2, U32>>)) -> @-E:Data -> @value:0x7e321819d0ff210531780719c7674cef/ordinary_schema_provision.Provision<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.empty_store(S, C, empty), 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.count_store(S, C, count)> -> @resource:R -> IO(Pair(0x7e321819d0ff210531780719c7674cef/ordinary_schema_provision.Provision<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.empty_store(S, C, empty), 0x7e321819d0ff210531780719c7674cef/ordinary_lifetime_scope.count_store(S, C, count)>, 0x7e321819d0ff210531780719c7674cef/world_io.Creation<S, 0x7e321819d0ff210531780719c7674cef/relation_commands.Store<S, 0x7e321819d0ff210531780719c7674cef/lifetime_scope.Store<S, C>>, R, 0x7e321819d0ff210531780719c7674cef/relation_commands.Notice<S, E>>))
Create a World with the scope/relation-wrapped provision in host IO. Consumes resource R and returns the provision together with world-io.Creation: Created carries the new World; Refused returns the incoming resource owner. Uses the checked host namespace allocator, not a caller-chosen namespace. No entity is spawned, made live or assigned to a scope by World creation. Use lifetime-scope.scope on the returned World to obtain a same-world token; scoped spawn and cleanup remain deferred until an explicit command barrier. This is an IO setup boundary, not a mathematical proof or an automatic affine finalizer. Example: test-fixtures/public-scopes/feature-timing-v1/fixture.bend: create; main.bend observes linked, persistent, failed and retried scope work.