Skip to content

Commit

Permalink
Merge pull request #1171 from AmbientRun/ambient-package-docs
Browse files Browse the repository at this point in the history
Package projection build script + static documentation generation
  • Loading branch information
philpax authored Nov 23, 2023
2 parents ca49cf4 + 3681f30 commit 979997e
Show file tree
Hide file tree
Showing 367 changed files with 4,190 additions and 624 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable

Expand Down Expand Up @@ -97,12 +103,18 @@ jobs:
runs-on: ubuntu-22.04

steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Check that guest/rust's documentation is well-formed
run: cd guest/rust && RUSTDOCFLAGS="-Dwarnings" cargo doc --workspace --all-features --no-deps
- name: Check that guest/rust builds under all configurations
run: cargo campfire-slim package check-all
run: cargo campfire-slim package check-all --delete-target

build-web:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -193,6 +205,13 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- name: Free up disk space
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: Rust cache
Expand All @@ -209,6 +228,12 @@ jobs:
RUST_LOG: ambient_gpu=info
EXAMPLES_ASSETS_HOST: ${{ secrets.EXAMPLES_ASSETS_HOST }}
steps:
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: rustup target add --toolchain stable wasm32-wasi
Expand Down
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"[toml]": {
"editor.formatOnSave": false
},
"rust-analyzer.showUnlinkedFileNotification": false,
"rust-analyzer.checkOnSave": true
"rust-analyzer.showUnlinkedFileNotification": false
}
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,38 @@ These PRs are not directly user-facing, but improve the development experience.
### Removed
-->

## Unreleased (YYYY-MM-DD)

### Added

#### Headline features

#### Other

### Changed

#### Breaking

- Ambient packages are no longer projected into Rust code using the `#[main]` macro. Instead, a build script is used to generate a `src/packages.rs`. The intent of this change is to make it obvious what's being generated and when, as well as making the macro less error-prone. To update for this:
- Add `pub mod packages;` to the Rust modules with `#[main]`.
- Add `ambient_package_projection` as a build dependency in `Cargo.toml`.
- Add `build.rs` to the project root with the following contents:
```rust
fn main() {
ambient_package_projection::generate();
}
```

#### Non-breaking

### Fixed

### Community PRs to internals

These PRs are not directly user-facing, but improve the development experience. They're just as appreciated!

### Removed

## Version 0.3.1 (2023-10-24)

### Added
Expand Down
Loading

0 comments on commit 979997e

Please sign in to comment.