Skip to content

Commit

Permalink
Initialize crate structure (#22)
Browse files Browse the repository at this point in the history
* Cargo init all the crates

* Make crates discoverable in the workspace

* Delete old source file stubs

* More ideas for crates

* Basic crate docs for every crate

* Configure Cargo.toml

* Fix docs complaining about duplicate crate names

* Fix list formatting
  • Loading branch information
alice-i-cecile authored Sep 22, 2024
1 parent b53dc49 commit 14dd2a3
Show file tree
Hide file tree
Showing 33 changed files with 353 additions and 23 deletions.
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ publish = false

[dependencies]
bevy = "0.14.0"

[workspace]
members = ["crates/*"]

[[bin]]
name = "bevy_editor_standalone"
path = "crates/bevy_editor/src/main.rs"
6 changes: 6 additions & 0 deletions crates/bevy_color_picker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_color_picker"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_color_picker/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A color picker widget for Bevy applications.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_command_palette/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_command_palette"
version = "0.1.0"
edition = "2021"

[dependencies]
21 changes: 21 additions & 0 deletions crates/bevy_command_palette/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! A command palette for Bevy applications.
//!
//! This lists a number of commands that can be executed by the user,
//! allowing for quick access to a variety of functionality.
//!
//! Search and keyboard shortcuts will both be supported.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_context_menu/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_context_menu"
version = "0.1.0"
edition = "2021"

[dependencies]
19 changes: 19 additions & 0 deletions crates/bevy_context_menu/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//! A context menu abstraction for Bevy applications.
//!
//! This crate opens up a menu with a list of options when the user right-clicks (or otherwise triggers the context menu),
//! based on what the user has clicked on.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_editor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_editor"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_editor/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! The main Bevy Editor application.
//!
//! This crate contains a standalone application that can be used to edit Bevy scenes and debug Bevy games.
//! Virtually all of the underlying logic and functionality of the editor should be backed by the assorted crates in the `bevy_editor` workspace;
//! this crate is simply responsible for orchestrating those crates and providing a user interface for them.
//!
//! The exact nature of this crate will be in flux for a while:
//!
//! - Initially, this will be a standard Bevy application that simply edits scenes with `DefaultPlugins`.
//! - Then, it will be a statically linked plugin that can be added to any Bevy game at compile time,
//! which transforms the user's application into an editor that runs their game.
//! - Finally, it will be a standalone application that communicates with a running Bevy game via the Bevy Remote Protocol.

fn main() {
println!("Hello, world!");
}
6 changes: 6 additions & 0 deletions crates/bevy_editor_camera/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_editor_camera"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_editor_camera/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A set of camera controllers suitable for controlling editor-style views and scene exploration.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_inspector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_inspector"
version = "0.1.0"
edition = "2021"

[dependencies]
18 changes: 18 additions & 0 deletions crates/bevy_inspector/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//! An interactive, reflection-based inspector for Bevy ECS data in running applications.
//!
//! Data can be viewed and modified in real-time, with changes being reflected in the application.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_localization/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_localization"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_localization/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A localization framework for Bevy applications, backed by Fluent.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_menu_bar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_menu_bar"
version = "0.1.0"
edition = "2021"

[dependencies]
19 changes: 19 additions & 0 deletions crates/bevy_menu_bar/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//! A consistently-styled, cross-platform menu bar for Bevy applications.
//!
//! This runs along the top of the screen and provides a list of options to the user,
//! such as "File", "Edit", "View", etc.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_panes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_panes"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_panes/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! Resizable, draggable, collapsible and dockable panes for Bevy.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_preferences/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_preferences"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_preferences/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A straightforward way to store and retrieve user preferences on disk for Bevy applications.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_scene_tree/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_scene_tree"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_scene_tree/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! An interactive, collapsible tree view for hierarchical ECS data in Bevy.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_toolbar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_toolbar"
version = "0.1.0"
edition = "2021"

[dependencies]
19 changes: 19 additions & 0 deletions crates/bevy_toolbar/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//! A toolbar widget for Bevy applications.
//!
//! Toolbars are a common UI element in many applications, providing quick access to frequently used commands,
//! and typically display small icons with on-hover tooltips.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_tooltips/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_tooltips"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_tooltips/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A tooltip system for Bevy applications, providing contextual information on hover.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_undo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_undo"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_undo/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! An action-based undo-redo system for Bevy ECS data.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
6 changes: 6 additions & 0 deletions crates/bevy_widgets/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "bevy_widgets"
version = "0.1.0"
edition = "2021"

[dependencies]
16 changes: 16 additions & 0 deletions crates/bevy_widgets/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! A collection of basic UI widgets for Bevy applications.

pub fn add(left: u64, right: u64) -> u64 {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}
Loading

0 comments on commit 14dd2a3

Please sign in to comment.