Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c5d1cdd
Fix #773
ClaasJG Apr 22, 2024
2cefae1
Add example for #733
ClaasJG Apr 23, 2024
0fc0552
Add doc example for default type parameters
ClaasJG Apr 23, 2024
b0c961d
Merge pull request #774 from ClaasJG/master
Imberflur Apr 24, 2024
08abbb6
Add workflow to build reference and tutorials
ClaasJG May 2, 2024
464dfe4
Add job to build Rust API Docs
ClaasJG May 2, 2024
fc704cb
Add job to build Website
ClaasJG May 2, 2024
1b0ba07
Add job to deploy to github pages
ClaasJG May 2, 2024
95435dd
Remove netlify
ClaasJG May 3, 2024
e5a213c
Website: Fix links for deployment in sub folders
ClaasJG May 3, 2024
f3ffaf4
Website: Remove references
ClaasJG May 3, 2024
e527fa4
Website: index from parts of README.md
ClaasJG May 3, 2024
25f5c61
Fix readme crates io/rs links
ClaasJG May 3, 2024
b6c2509
Update links to website and repo
ClaasJG May 4, 2024
7d9cbfe
Merge pull request #777 from ClaasJG/master
Imberflur May 5, 2024
306ba27
Change crate io / rs links
ClaasJG May 5, 2024
3064ccd
Merge pull request #779 from ClaasJG/master
Imberflur May 5, 2024
e05b7c5
Fix readme badges.
ClaasJG May 5, 2024
3f403f5
Remove Codecov config and kcov script
ClaasJG May 5, 2024
f2cec71
Merge pull request #780 from ClaasJG/badges
Imberflur May 5, 2024
35c9ba0
update aHash and dev dependencies
xMAC94x May 13, 2024
4e2da1d
Merge pull request #781 from amethyst/xMAC/update_deps
Imberflur May 14, 2024
e7629ea
Fix grammatical mistake in FlaggedStorage chapter
mmghannam Jun 7, 2024
d303a8e
Merge pull request #782 from mmghannam/patch-2
Imberflur Jun 7, 2024
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
120 changes: 120 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Website

on:
push:
branches:
- master
pull_request:

env:
RUSTFLAGS: -Cdebuginfo=0
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: 1

jobs:
Tutorials:
name: Doc Tutorials
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: docs/tutorials

- name: Build Books
uses: taiki-e/install-action@v2
with:
tool: mdbook@0.4.37

- run: mdbook build docs/tutorials --dest-dir ${GITHUB_WORKSPACE}/public/docs/tutorials

- uses: actions/upload-artifact@v4
with:
name: Doc Tutorials
path: public/docs/tutorials

Rust-API:
name: Doc Rust API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rust-docs

- name: Build API Doc
env:
FEATURES: parallel serde derive uuid_entity storage-event-control
run: cargo doc --all --features "${FEATURES}" # --no-deps

- uses: actions/upload-artifact@v4
with:
name: Doc Rust API
path: |
target/doc

Website:
name: Doc Website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
docs/website

- name: Find Base Url
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Use the API to retrieve the github pages url and set an environment variable containing the value.
run: echo "GITHUB_PAGES_URL=$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')" >> $GITHUB_ENV

- uses: taiki-e/install-action@v2
with:
tool: zola@0.18.0

- run: zola build --base-url $GITHUB_PAGES_URL
working-directory: docs/website

- uses: actions/upload-artifact@v4
with:
name: Doc Zola
path: docs/website/public

Deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [ Tutorials, Rust-API, Website ]
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
if: github.event_name != 'pull_request'
steps:
- uses: actions/download-artifact@v4
with:
name: Doc Tutorials
path: public/docs/tutorials

- uses: actions/download-artifact@v4
with:
name: Doc Rust API
path: public/docs/api

- uses: actions/download-artifact@v4
with:
name: Doc Zola
path: public

- uses: actions/upload-pages-artifact@v3
with:
path: public

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ description = """
Specs is an Entity-Component-System library written in Rust.
"""
documentation = "https://docs.rs/specs/"
repository = "https://github.com/slide-rs/specs"
homepage = "https://specs.amethyst.rs"
repository = "https://github.com/amethyst/specs"
homepage = "https://amethyst.github.io/specs"
readme = "README.md"
keywords = ["gamedev", "ecs", "entity", "component"]
categories = ["concurrency", "game-engines"]
Expand All @@ -20,7 +20,7 @@ rust-version = "1.70.0"
autobenches = false

[dependencies]
ahash = "0.7.6"
ahash = "0.8.6"
crossbeam-queue = "0.3"
hibitset = { version = "0.6.4", default-features = false }
log = "0.4.8"
Expand Down Expand Up @@ -49,9 +49,9 @@ shred-derive = ["shred/shred-derive"]
features = ["parallel", "serde", "shred-derive", "specs-derive", "uuid_entity", "storage-event-control"]

[dev-dependencies]
nalgebra = "0.31"
nalgebra = "0.32"
criterion = "0.3.1"
ron = "0.7.1"
ron = "0.8.1"
rand = "0.8"
serde_json = "1.0.48"
shred = { version = "0.16.0", default-features = false, features = ["shred-derive"] }
Expand Down
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

> **S**pecs **P**arallel **ECS**

[![Build Status][bi]][bl] [![Crates.io][ci]][cl] [![Gitter][gi]][gl] ![MIT/Apache][li] [![Docs.rs][di]][dl] [![Code coverage][coi]][cov] ![LoC][lo]
[![Build Status][bi]][bl] [![Crates.io][ci]][cl] [![Gitter][gi]][gl] ![MIT/Apache][li] [![Docs.rs][di]][dl]

[bi]: https://travis-ci.org/amethyst/specs.svg?branch=master
[bl]: https://travis-ci.org/amethyst/specs
[bi]: https://github.com/amethyst/specs/actions/workflows/ci.yml/badge.svg?branch=master
[bl]: https://github.com/amethyst/specs/actions/workflows/ci.yml

[ci]: https://img.shields.io/crates/v/specs.svg
[cl]: https://crates.io/crates/specs/

[gi]: https://badges.gitter.im/slide-rs/specs.svg
[gl]: https://gitter.im/slide-rs/specs

[li]: https://img.shields.io/crates/l/specs.svg?maxAge=2592000

[di]: https://docs.rs/specs/badge.svg
[dl]: https://docs.rs/specs/

[gi]: https://badges.gitter.im/slide-rs/specs.svg
[gl]: https://gitter.im/slide-rs/specs

[coi]: https://img.shields.io/codecov/c/gitlab/torkleyy/specs/master.svg
[cov]: https://codecov.io/gl/torkleyy/specs/branch/master

[lo]: https://tokei.rs/b1/github/slide-rs/specs?category=code

Specs is an Entity-Component System written in Rust.
Unlike most other ECS libraries out there, it provides
Expand All @@ -39,7 +35,7 @@ Minimum Rust version: 1.70

## [Link to the book][book]

[book]: https://specs.amethyst.rs/docs/tutorials/
[book]: https://amethyst.github.io/specs/docs/tutorials/

## Example

Expand Down Expand Up @@ -118,10 +114,10 @@ Please look into [the examples directory](examples) for more.

| crate | version |
|----------|------------------------------------------------------------------------------------------------|
| hibitset | [![hibitset](https://img.shields.io/crates/v/hibitset.svg)](https://crates.rs/crates/hibitset) |
| rayon | [![rayon](https://img.shields.io/crates/v/rayon.svg)](https://crates.rs/crates/rayon) |
| shred | [![shred](https://img.shields.io/crates/v/shred.svg)](https://crates.rs/crates/shred) |
| shrev | [![shrev](https://img.shields.io/crates/v/shrev.svg)](https://crates.rs/crates/shrev) |
| hibitset | [![hibitset](https://img.shields.io/crates/v/hibitset.svg)](https://crates.io/crates/hibitset) |
| rayon | [![rayon](https://img.shields.io/crates/v/rayon.svg)](https://crates.io/crates/rayon) |
| shred | [![shred](https://img.shields.io/crates/v/shred.svg)](https://crates.io/crates/shred) |
| shrev | [![shrev](https://img.shields.io/crates/v/shrev.svg)](https://crates.io/crates/shrev) |

## Contribution

Expand Down
26 changes: 0 additions & 26 deletions codecov.yml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/book.toml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/reference/src/01_system.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/reference/src/SUMMARY.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/reference/src/intro.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/tutorials/src/01_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ Additional documentation is available on `docs.rs`:

* [API documentation for Specs](https://docs.rs/specs)

There also is a reference-style documentation available here:

* [Specs reference](../reference/)

You don't yet know what an ECS is all about? The next section
is for you! In case you already know what an ECS is, just skip it.

Expand Down
17 changes: 16 additions & 1 deletion docs/tutorials/src/02_hello_world.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,25 @@ struct Velocity {
If the `#[storage(...)]` attribute is omitted, the given component will be
stored in a `DenseVecStorage` by default. But for this example, we are
explicitly asking for these components to be kept in a `VecStorage` instead (see
the later [storages chapter][sc] for more details). But before we move on, we
the later [storages chapter][sc] for more details).

`#[storage(VecStorage)]` assumes `<Self>` as the default type parameter for the storage.
More complex type parameters can be specified explicitly:

```rust,ignore
#[derive(Component, Debug)]
#[storage(FlaggedStorage<Self, DenseVecStorage<Self>>)]
pub struct Data {
[..]
}
```
(see the later [`FlaggedStorage` and modification events chapter][tc] for more details on `FlaggedStorage`)

But before we move on, we
need to create a world in which to store all of our components.

[sc]: ./05_storages.html
[tc]: ./12_tracked.html

## The `World`

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/src/12_tracked.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# `FlaggedStorage` and modification events

In most games you will have many entities, but from frame to frame there will
usually be components that will only need to updated when something related is
usually be components that will only need to be updated when something related is
modified.

To avoid a lot of unnecessary computation when updating components it
Expand Down
12 changes: 7 additions & 5 deletions docs/website/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The URL the site will be built for
base_url = "https://slide-rs.github.io/"
# Should be supplied with --base-url
base_url = "/"

title = "Specs"
description = "Specs Parallel ECS, a Rust library for parallel data processing using the Entity Component System pattern"
Expand All @@ -8,19 +8,21 @@ theme = "hyde"
# Whether to automatically compile all Sass files in the sass directory
compile_sass = true

[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true

highlight_theme = "inspired-github"

# Whether to build a search index to be used later on by a JavaScript library
build_search_index = true

taxonomies = []

[extra]
hyde_links = [
{url = "/", name = "Home"},
{url = ".", name = "Home"},
{url = "docs", name = "Docs"},
{url = "https://github.com/slide-rs/specs", name = "GitHub"},
# {url = "about", name = "About"},
{absolut_url = "https://github.com/amethyst/specs", name = "GitHub"},
]
Loading
Loading