Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
16 changes: 14 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
[workspace]
members = [ "crates/sparkl3d-core", "crates/sparkl3d-kernels", "crates/sparkl2d", "crates/sparkl2d-core", "crates/sparkl2d-kernels", "examples2d",
"crates/sparkl3d", "examples3d" ]
members = [
"crates/sparkl3d-core",
"crates/sparkl3d-kernels",
"crates/sparkl2d",
"crates/sparkl2d-core",
"crates/sparkl2d-kernels",
"examples2d",
"crates/sparkl3d",
"examples3d",
]
resolver = "2"

[patch.crates-io]
#rapier2d = { git = "https://github.com/dimforge/rapier", branch = "testbed-init-app" }
#rapier3d = { git = "https://github.com/dimforge/rapier", branch = "testbed-init-app" }
#rapier2d = { path = "../rapier/crates/rapier2d" }
#rapier3d = { path = "../rapier/crates/rapier3d" }
#rapier_testbed2d = { git = "https://github.com/dimforge/rapier", branch = "testbed-init-app" }
#rapier_testbed3d = { git = "https://github.com/dimforge/rapier", branch = "testbed-init-app" }
#rapier_testbed2d = { path = "../rapier/crates/rapier_testbed2d" }
#rapier_testbed3d = { path = "../rapier/crates/rapier_testbed3d" }
#nalgebra = { git = "https://github.com/dimforge/nalgebra" }
#simba = { git = "https://github.com/dimforge/simba" }

Expand Down
34 changes: 24 additions & 10 deletions crates-ptx/sparkl2d-kernels-ptx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
[package]
name = "sparkl2d-kernels-ptx"
name = "sparkl2d-kernels-ptx"
version = "0.4.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
authors = ["Sébastien Crozet <developer@crozet.re>"]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/sparkl2d"
homepage = "http://sparkl.rs"
repository = "https://github.com/dimforge/sparkl"
readme = "README.md"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "joints" ]
categories = [
"science",
"game-development",
"mathematics",
"simulation",
"wasm",
]
keywords = ["physics", "dynamics", "rigid", "real-time", "joints"]
license = "Apache-2.0"
edition = "2018"
publish = false
Expand All @@ -17,22 +23,30 @@ publish = false
maintenance = { status = "actively-developed" }

[features]
default = [ "dim2", "f32" ]
default = ["dim2", "f32"]
dim2 = []
f32 = []

[lib]
path = "../../src_kernels/lib.rs"
required-features = [ "dim2", "f32" ]
required-features = ["dim2", "f32"]
crate-type = ["cdylib", "rlib"]


[dependencies]
nalgebra = { version = "0.32", default-features = false, features = [ "bytemuck", "cuda" ] }
sparkl2d-core = { version = "0.4", features = [ "cuda" ], path = "../../crates/sparkl2d-core" }
nalgebra = { version = "0.33", default-features = false, features = [
"bytemuck",
"cuda",
] }
sparkl2d-core = { version = "0.4", features = [
"cuda",
], path = "../../crates/sparkl2d-core" }
cuda_std = "0.2"
bytemuck = { version = "1", features = [ "derive" ] }
parry2d = { version = "0.13", default-features = false, features = [ "required-features", "cuda" ] }
bytemuck = { version = "1", features = ["derive"] }
parry2d = { version = "0.17", default-features = false, features = [
"required-features",
"cuda",
] }
cust_core = "0.1"

[target.'cfg(not(target_os = "cuda"))'.dependencies]
Expand Down
36 changes: 25 additions & 11 deletions crates-ptx/sparkl3d-kernels-ptx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
[package]
name = "sparkl3d-kernels-ptx"
name = "sparkl3d-kernels-ptx"
version = "0.4.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
authors = ["Sébastien Crozet <developer@crozet.re>"]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/sparkl3d"
homepage = "http://sparkl.rs"
repository = "https://github.com/dimforge/sparkl"
readme = "README.md"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "joints" ]
categories = [
"science",
"game-development",
"mathematics",
"simulation",
"wasm",
]
keywords = ["physics", "dynamics", "rigid", "real-time", "joints"]
license = "Apache-2.0"
edition = "2018"
publish = false
include = [ "../../resources/sparkl3d-kernels.ptx"]
include = ["../../resources/sparkl3d-kernels.ptx"]


[badges]
maintenance = { status = "actively-developed" }

[features]
default = [ "dim3", "f32" ]
default = ["dim3", "f32"]
dim3 = []
f32 = []

[lib]
path = "../../src_kernels/lib.rs"
required-features = [ "dim3", "f32" ]
required-features = ["dim3", "f32"]
crate-type = ["cdylib", "rlib"]


[dependencies]
nalgebra = { version = "0.32", default-features = false, features = [ "bytemuck", "cuda" ] }
sparkl3d-core = { version = "0.4", features = [ "cuda" ], path = "../../crates/sparkl3d-core" }
nalgebra = { version = "0.33", default-features = false, features = [
"bytemuck",
"cuda",
] }
sparkl3d-core = { version = "0.4", features = [
"cuda",
], path = "../../crates/sparkl3d-core" }
cuda_std = "0.2"
bytemuck = { version = "1", features = [ "derive" ] }
parry3d = { version = "0.13", default-features = false, features = [ "required-features", "cuda" ] }
bytemuck = { version = "1", features = ["derive"] }
parry3d = { version = "0.17", default-features = false, features = [
"required-features",
"cuda",
] }
cust_core = "0.1"


Expand Down
35 changes: 22 additions & 13 deletions crates/sparkl2d-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,48 +1,57 @@
[package]
name = "sparkl2d-core"
name = "sparkl2d-core"
version = "0.4.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
authors = ["Sébastien Crozet <developer@crozet.re>"]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/sparkl2d"
homepage = "http://sparkl.rs"
repository = "https://github.com/dimforge/sparkl"
readme = "README.md"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "joints" ]
categories = [
"science",
"game-development",
"mathematics",
"simulation",
"wasm",
]
keywords = ["physics", "dynamics", "rigid", "real-time", "joints"]
license = "Apache-2.0"
edition = "2018"

[badges]
maintenance = { status = "actively-developed" }

[features]
default = [ "dim2", "f32" ]
default = ["dim2", "f32"]
dim2 = []
f32 = []

serde-serialize = [ "serde", "nalgebra/serde-serialize" ]
cuda = [ "cust", "cust_core" ]
serde-serialize = ["serde", "nalgebra/serde-serialize"]
cuda = ["cust", "cust_core"]


[lib]
path = "../../src_core/lib.rs"
required-features = [ "dim2", "f32" ]

required-features = ["dim2", "f32"]


[dependencies]
nalgebra = { version = "0.32", default-features = false, features = [ "macros", "libm", "bytemuck" ] }
nalgebra = { version = "0.33", default-features = false, features = [
"macros",
"libm",
"bytemuck",
] }
bitflags = "1"
bytemuck = { version = "1", features = [ "derive" ] }
bytemuck = { version = "1", features = ["derive"] }
cust_core = { version = "0.1", optional = true }

# Serialization
serde = { version = "1.0", optional = true, features = [ "derive" ]}
serde = { version = "1.0", optional = true, features = ["derive"] }


[target.'cfg(not(target_os = "cuda"))'.dependencies]
cust = { version = "0.3", optional = true }


[dev-dependencies]
oorandom = "11"
oorandom = "11"
32 changes: 22 additions & 10 deletions crates/sparkl2d-kernels/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
[package]
name = "sparkl2d-kernels"
name = "sparkl2d-kernels"
version = "0.4.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
authors = ["Sébastien Crozet <developer@crozet.re>"]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/sparkl2d"
homepage = "http://sparkl.rs"
repository = "https://github.com/dimforge/sparkl"
readme = "README.md"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "joints" ]
categories = [
"science",
"game-development",
"mathematics",
"simulation",
"wasm",
]
keywords = ["physics", "dynamics", "rigid", "real-time", "joints"]
license = "Apache-2.0"
edition = "2018"

[badges]
maintenance = { status = "actively-developed" }

[features]
default = [ "dim2", "f32" ]
default = ["dim2", "f32"]
dim2 = []
f32 = []

[lib]
path = "../../src_kernels/lib.rs"
required-features = [ "dim2", "f32" ]
required-features = ["dim2", "f32"]
crate-type = ["cdylib", "rlib"]


[dependencies]
nalgebra = { version = "0.32", default-features = false, features = [ "bytemuck", "cuda" ] }
sparkl2d-core = { version = "0.4", features = [ "cuda" ], path = "../sparkl2d-core" }
nalgebra = { version = "0.33", default-features = false, features = [
"bytemuck",
] }
sparkl2d-core = { version = "0.4", features = [
"cuda",
], path = "../sparkl2d-core" }
cuda_std = "0.2"
bytemuck = { version = "1", features = [ "derive" ] }
parry2d = { version = "0.13", default-features = false, features = [ "required-features", "cuda" ] }
bytemuck = { version = "1", features = ["derive"] }
parry2d = { version = "0.17", default-features = false, features = [
"required-features",
] }
cust_core = "0.1"

[target.'cfg(not(target_os = "cuda"))'.dependencies]
Expand Down
61 changes: 39 additions & 22 deletions crates/sparkl2d/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,54 +1,64 @@
[package]
name = "sparkl2d"
name = "sparkl2d"
version = "0.4.0"
authors = [ "Sébastien Crozet <developer@crozet.re>" ]
authors = ["Sébastien Crozet <developer@crozet.re>"]
description = "3-dimensional physics engine in Rust."
documentation = "http://docs.rs/sparkl2d"
homepage = "http://sparkl.rs"
repository = "https://github.com/dimforge/sparkl"
readme = "README.md"
categories = [ "science", "game-development", "mathematics", "simulation", "wasm"]
keywords = [ "physics", "dynamics", "rigid", "real-time", "joints" ]
categories = [
"science",
"game-development",
"mathematics",
"simulation",
"wasm",
]
keywords = ["physics", "dynamics", "rigid", "real-time", "joints"]
license = "Apache-2.0"
edition = "2018"

[badges]
maintenance = { status = "actively-developed" }

[features]
default = [ "dim2", "f32" ]
default = ["dim2", "f32"]
dim2 = []
f32 = []
cuda = [ "cust", "sparkl2d-kernels" ]
cuda = ["cust", "sparkl2d-kernels"]

serde-serialize = [ "serde", "nalgebra/serde-serialize", "parry2d/serde-serialize", "rapier2d/serde-serialize",
"sparkl2d-core/serde-serialize"]
serde-serialize = [
"serde",
"nalgebra/serde-serialize",
"parry2d/serde-serialize",
"rapier2d/serde-serialize",
"sparkl2d-core/serde-serialize",
]

# Third-party integration.
rapier-testbed = [ "rapier_testbed2d", "graphics", "itertools" ]
rapier-harness = [ "rapier-testbed" ]
graphics = [ "bevy", "bevy_egui", "bevy_ecs" ]
rapier-testbed = ["rapier_testbed2d", "graphics", "itertools"]
rapier-harness = ["rapier-testbed"]
graphics = ["bevy", "bevy_egui", "bevy_ecs"]

[lib]
path = "../../src/lib.rs"
required-features = [ "dim2", "f32" ]

required-features = ["dim2", "f32"]


[dependencies]
sparkl2d-core = { version = "0.4", path = "../sparkl2d-core" }
nalgebra = "0.32"
parry2d = "0.13"
rapier2d = { version = "0.17.2", git = "https://github.com/dimforge/rapier.git", rev = "e9ea2ca10b3058a6ac2d7f4b79d351ef18ad3c06" }
instant = { version = "0.1", features = [ "now" ] }
nalgebra = "0.33"
parry2d = "0.17"
rapier2d = { version = "0.22" }
instant = { version = "0.1", features = ["now"] }
bitflags = "1"
anyhow = "1"
log = "0.4"

oorandom = "11" # TODO: remove this, only for testing.

# Serialization
serde = { version = "1.0", optional = true, features = [ "derive" ]}
serde = { version = "1.0", optional = true, features = ["derive"] }

# Parallelism
rayon = "1"
Expand All @@ -59,17 +69,24 @@ memmap2 = "0.5"
bytemuck = "1"

# Third-party integration
rapier_testbed2d = { version = "0.17.0", optional = true , git = "https://github.com/dimforge/rapier.git", rev = "e9ea2ca10b3058a6ac2d7f4b79d351ef18ad3c06" }
bevy_egui = { version = "0.22", optional = true, features = [ "immutable_ctx" ] }
bevy_ecs = { version = "0.11", optional = true }
rapier_testbed2d = { version = "0.22.0", optional = true }
bevy_egui = { version = "0.26", optional = true, features = ["immutable_ctx"] }
bevy_ecs = { version = "0.13", optional = true }
itertools = { version = "0.10", optional = true }

# CUDA
cust = { version = "0.3", optional = true }
sparkl2d-kernels = { version = "0.4", optional = true, path = "../sparkl2d-kernels" }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
bevy = { version = "0.11", default-features = false, features = ["bevy_winit", "bevy_pbr", "bevy_sprite", "bevy_core_pipeline", "bevy_render", "x11"], optional = true }
bevy = { version = "0.13", default-features = false, features = [
"bevy_winit",
"bevy_pbr",
"bevy_sprite",
"bevy_core_pipeline",
"bevy_render",
"x11",
], optional = true }

# Dependencies for WASM only.
#[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down
Loading