Skip to content

Commit

Permalink
Initial Tutorial info (#29)
Browse files Browse the repository at this point in the history
* Initial Tutorial info

* Roughly finishing the rest of the tutorial

* Add serde to Cargo

* Update book with mermaid

* Use Nix in GitHub CI, codespell, rustfmt, clippy

* Update workflows

* Use dev flakes for alsa and udev

* Switch to DeterminateSystems actions

* Add pkgs-config to native build inputs

* Fix workflows, start typestate chapter

* Revisions and shortening

* Small tweaks

* Condense tutorial

* Remove install for mermaid,admonish and perform in CI
  • Loading branch information
gavinleroy authored Aug 28, 2024
1 parent 8a3717e commit 112c6be
Show file tree
Hide file tree
Showing 55 changed files with 1,536 additions and 155 deletions.
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,target,node_modules,dist,*.yaml,*.lock,./book/book,*.min.js
ignore-words-list = implementor,implementors,ser,crate
count =
quiet-level = 3
29 changes: 29 additions & 0 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish-tutorial

on:
push:
branches:
- main

jobs:
tutorial:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Build Tutorial
run: |
nix develop --command mdbook-admonish install book
nix develop --command mdbook-mermaid install book
nix develop --command mdbook build book
- uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: ./book/book
clean: true
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup
uses: ./.github/workflows/setup
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Argus tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Argus Test
run: nix develop --command ci-check
44 changes: 19 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,37 +10,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/install@v0.1
with:
crate: cargo-workspaces
version: latest
use-tool-cache: true
- name: Setup
uses: ./.github/workflows/setup
- run: cargo ws publish skip --no-remove-dev-deps --from-git --yes --token ${{ secrets.CRATES_IO }}
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- run: nix develop --command \
cargo ws publish skip --no-remove-dev-deps --from-git --yes --token ${{ secrets.CRATES_IO }}

publish-ide:
runs-on: ubuntu-latest
needs: publish-crates
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup
uses: ./.github/workflows/setup
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main

- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
id: publishToOpenVSX
with:
pat: ${{ secrets.OVSX_MRKT }}
packagePath: "./ide/packages/extension"
- name: Build TS bindings
run: nix develop --command cargo make init-bindings

- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VSCODE_MRKT }}
registryUrl: https://marketplace.visualstudio.com
packagePath: "./ide/packages/extension"
- name: Depot Setup
run: nix develop --command depot setup

- name: Publish Extension
run: |
cd ide/packages/extension
nix develop --command vsce package
nix develop --command vsce publish -p ${{ secrets.VSCODE_MRKT }} --packagePath argus-*.vsix
nix develop --command pnpx ovsx publish argus-*.vsix -p ${{ secrets.OVSX_MRKT }}
33 changes: 0 additions & 33 deletions .github/workflows/setup/action.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ gha-creds-*.json
/org/meeting*
/org/*.png
/org/media/
sample-book/

# Rust things
target/
Expand Down
3 changes: 3 additions & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
book
mdbook-admonish.css
mermaid-init.js
mermaid.min.js
16 changes: 16 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,20 @@ src = "src"
title = "Argus: a trait debugger for Rust"

[output.html]
default-theme = "light"

curly-quotes = true
additional-js = ["mermaid.min.js", "mermaid-init.js"]
additional-css = ["./mdbook-admonish.css"]

[preprocessor]

[preprocessor.image-size]
command = "mdbook-image-size"

[preprocessor.mermaid]
command = "mdbook-mermaid"

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "3.0.2" # do not edit: managed by `mdbook-admonish install`
11 changes: 3 additions & 8 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@

[Introduction](README.md)

- [Debugging trait errors](debug-media.md)
<!-- - [Whirlwind Tour](whirlwind.md) -->

- [How to think about Argus]()
- [Trait Debugging 101](trait-debugging-101.md)

- [Debug a Bevy game]()
- [Trait Methods and Typestate](typestate.md)

- [Debug an Axum server]()

- [Debug async Rust]()

- [Debug stack overflows]()
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/src/assets/diesel-bad-select/find-bug.mp4
Binary file not shown.
Binary file added book/src/assets/diesel-bad-select/fixed-error.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/argus-toolbar.png
Binary file not shown.
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/fix-error.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/impl-block.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/jump-to-error.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/open-to-tree.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/top-down.mp4
Binary file not shown.
Binary file removed book/src/assets/simple-workspace/tree-ico.png
Binary file not shown.
Loading

0 comments on commit 112c6be

Please sign in to comment.