Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev and dev_native features #20

Merged
merged 10 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Build
run: |
cargo build --release --target wasm32-unknown-unknown
cargo build --release --target wasm32-unknown-unknown --no-default-features --features=web

- name: Prepare package
run: |
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:

- name: Build
run: |
cargo build --release --target x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu --no-default-features --features=native,bevy/wayland

- name: Prepare package
run: |
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:

- name: Build
run: |
cargo build --release --target x86_64-pc-windows-msvc
cargo build --release --target x86_64-pc-windows-msvc --no-default-features --features=native

- name: Prepare package
run: |
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:

- name: Build
run: |
cargo build --release --target x86_64-apple-darwin
cargo build --release --target x86_64-apple-darwin --no-default-features --features=native

- name: Prepare Package
run: |
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:

- name: Build
run: |
cargo build --release --target aarch64-apple-darwin
cargo build --release --target aarch64-apple-darwin --no-default-features --features=native

- name: Prepare Package
run: |
Expand Down
4 changes: 3 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"type": "cargo",
"command": "run",
"args": [
"--release"
"--release",
"--no-default-features",
"--features=native"
],
"presentation": {
"clear": true
Expand Down
38 changes: 36 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "bevy_github_ci_template"
name = "bevy_template"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0 OR CC0-1.0"
Expand All @@ -16,4 +16,38 @@ opt-level = 1
opt-level = 3

[dependencies]
bevy = "0.12"
bevy = "0.14"
# Required for web builds.
wasm-bindgen = { version = "0.2", optional = true }
benfrankel marked this conversation as resolved.
Show resolved Hide resolved

[features]
janhohenheim marked this conversation as resolved.
Show resolved Hide resolved
default = [
# Default to a native dev build.
"native_dev",
]
core = []
benfrankel marked this conversation as resolved.
Show resolved Hide resolved
dev = [
# Improve compile times for dev builds.
# NOTE: Uncomment to enable dynamic linking, but this may not work on Windows.
#"bevy/dynamic_linking",
]
native = [
"core",
]
native_dev = [
"native",
"dev",
# Enable asset hot reloading for native dev builds.
"bevy/file_watcher",
# Enable embedded asset hot reloading for native dev builds.
"bevy/embedded_watcher",
]
web = [
"core",
"dep:wasm-bindgen",
]
web_dev = [
"web",
"dev",
]

4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// workflow treats them as errors, so this allows them throughout the project.
// Feel free to delete this line.
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
// Disable console on Windows for release builds.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
// Disable console on Windows for non-dev builds.
#![cfg_attr(not(feature = "dev"), windows_subsystem = "windows")]

use bevy::asset::AssetMetaCheck;
use bevy::prelude::*;
Expand Down
Loading