[Feature request]: Enable using .spawn_continuous_service via mut Command via proxy systems

Open
#92 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

No project files or tests are named. Start by reading the current spawn_continuous_service API and the linked bevy_proxy_system example, then trace how App schedules and SystemIds are handled. Done should support the requested per-need service initialization through a bevy_impulse proxy without requiring access through &mut App.

Written by the indexing model from the issue text.

Description

enhancement
Before proceeding, is there an existing issue or discussion for this?
Description

Curently, .spawn_continuous_service can only be used through &mut App which is problematic for enabling services on a "per-need basis". E.G:

if you had a Service that dependent on a picking service:

pub struct PickingService(Service<(), ()>);

... inside a plugin init
  let picking_service = self.spawn_continuous_service(
      Update,
      picking_service::<F>.configure(|config: ScheduleConfigs<ScheduleSystem>| {
          config.in_set(SelectionServiceStages::Pick)
      }),
  );

You would either need a singleton plugin for this service ,or make a create a large resource that contains this service + a lot of other unrelated services.

to reduce .add_plugin spam and to allow initializing services via cascading FromWorlds, systems could be run within bevy_impulse via a proxy system that iterates over registered app schedules(similar to type registry) and runs systems via SystemIds.

E.G: Something along the lines of this example:
https://github.com/rydb/bevy_proxy_system/blob/main/src/main.rs

Implementation Considerations

No response

Alternatives

No response

Additional information

No response

Dominant language
Rust
Stars
75
Forks
18
Avg merge
12d 12h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from open-rmf/crossflow

All issues in open-rmf/crossflow

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.