Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/examples/no_std/library/Cargo.toml
6849 views
1
[package]
2
name = "no_std_library"
3
version = "0.1.0"
4
edition = "2024"
5
publish = false
6
7
# Normally we'd put all dependencies in [dependencies], but this syntax is easier to document
8
[dependencies.bevy]
9
# In your library you'd use version = "x.y.z", but since this is an example inside the Bevy
10
# repository we use a path instead.
11
path = "../../../"
12
# Since `std` is a default feature, first we disable default features
13
default-features = false
14
# We're free to enable any features our library needs.
15
# Note that certain Bevy features rely on `std`.
16
features = [
17
# "bevy_color",
18
# "bevy_state",
19
]
20
21
[features]
22
# `no_std` is relatively niche, so we choose defaults to cater for the majority of our users.
23
default = ["std"]
24
25
# Below are some features we recommend libraries expose to assist with their usage and their own testing.
26
27
# Uses the Rust standard library.
28
std = ["bevy/std"]
29
30
# Uses `libm` for floating point functions.
31
libm = ["bevy/libm"]
32
33
# Rely on `critical-section` for synchronization primitives.
34
critical-section = ["bevy/critical-section"]
35
36
# Enables access to browser APIs in a web context.
37
web = ["bevy/web"]
38
39
[lints.clippy]
40
# These lints are very helpful when working on a library with `no_std` support.
41
# They will warn you if you import from `std` when you could've imported from `core` or `alloc`
42
# instead.
43
# Since `core` and `alloc` are available on any target that has `std`, there is no downside to this.
44
std_instead_of_core = "warn"
45
std_instead_of_alloc = "warn"
46
alloc_instead_of_core = "warn"
47
48