Move the Rust tutorial into a sub-directory

To make room for the C++ version next to it :-)
This commit is contained in:
Simon Hausmann 2021-06-17 11:03:27 +02:00
parent a012809bd0
commit 7b95371c78
26 changed files with 10 additions and 10 deletions

View file

@ -372,7 +372,7 @@ jobs:
args: -p sixtyfps -p sixtyfps-build -p sixtyfps-interpreter --no-deps --all-features args: -p sixtyfps -p sixtyfps-build -p sixtyfps-interpreter --no-deps --all-features
- name: "Rust Tutorial Docs" - name: "Rust Tutorial Docs"
run: mdbook build run: mdbook build
working-directory: docs/tutorial working-directory: docs/tutorial/rust
- name: "Node docs" - name: "Node docs"
run: | run: |
npm install --ignore-scripts npm install --ignore-scripts
@ -386,10 +386,10 @@ jobs:
target/doc target/doc
target/cppdocs/html target/cppdocs/html
api/sixtyfps-node/docs api/sixtyfps-node/docs
docs/tutorial/book/html docs/tutorial/rust/book/html
- name: Clean cache # Don't cache docs to avoid them including removed classes being published - name: Clean cache # Don't cache docs to avoid them including removed classes being published
run: | run: |
rm -rf target/doc target/cppdocs api/sixtyfps-node/docs docs/tutorial/book rm -rf target/doc target/cppdocs api/sixtyfps-node/docs docs/tutorial/rust/book
wasm: wasm:
env: env:
@ -671,7 +671,7 @@ jobs:
mkdir -p docs/rust mkdir -p docs/rust
cp -a ../target/doc/* docs/rust/ cp -a ../target/doc/* docs/rust/
mkdir -p docs/tutorial/rust mkdir -p docs/tutorial/rust
cp -a ../docs/tutorial/book/html/* docs/tutorial/rust cp -a ../docs/tutorial/rust/book/html/* docs/tutorial/rust
mkdir -p docs/node mkdir -p docs/node
cp -a ../api/sixtyfps-node/docs/* docs/node/ cp -a ../api/sixtyfps-node/docs/* docs/node/
git add docs git add docs

View file

@ -37,7 +37,7 @@ members = [
'tests/driver/cpp', 'tests/driver/cpp',
'tests/driver/nodejs', 'tests/driver/nodejs',
'tests/driver/interpreter', 'tests/driver/interpreter',
'docs/tutorial/src', 'docs/tutorial/rust/src',
] ]
default-members = [ default-members = [

View file

@ -31,5 +31,5 @@ name = "memory_tutorial_game_logic_in_rust"
path = "main_game_logic_in_rust.rs" path = "main_game_logic_in_rust.rs"
[dependencies] [dependencies]
sixtyfps = { path = "../../../api/sixtyfps-rs" } sixtyfps = { path = "../../../../api/sixtyfps-rs" }
rand = "0.8" rand = "0.8"

View file

@ -0,0 +1 @@
../../../../examples/memory/icons

View file

@ -1 +0,0 @@
../../../examples/memory/icons

View file

@ -63,7 +63,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let cargo_manifest_dir = env!("CARGO_MANIFEST_DIR").replace("\\", "/"); let cargo_manifest_dir = env!("CARGO_MANIFEST_DIR").replace("\\", "/");
for entry in for entry in
std::fs::read_dir(Path::new(env!("CARGO_MANIFEST_DIR")).join("../../docs/tutorial/src"))? std::fs::read_dir(Path::new(env!("CARGO_MANIFEST_DIR")).join("../../docs/tutorial/rust/src"))?
{ {
let entry = entry?; let entry = entry?;
let path = entry.path(); let path = entry.path();
@ -78,7 +78,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
writeln!( writeln!(
tests_file, tests_file,
"\n#[cfg(test)]\n#[path = \"{}/../../docs/tutorial/src/{}\"]\nmod {};", "\n#[cfg(test)]\n#[path = \"{}/../../docs/tutorial/rust/src/{}\"]\nmod {};",
cargo_manifest_dir, cargo_manifest_dir,
path.file_name().unwrap().to_string_lossy(), path.file_name().unwrap().to_string_lossy(),
stem stem