metal-rs
metal-rs copied to clipboard
Host documentation
Most of the project rely on docs.rs for documentation, however it only builds Linux at the moment. We need to find a good way of providing the documentation here.
cc @fkaa @JohnColanduoni
Related - https://github.com/onur/docs.rs/pull/73
Also related to this: https://github.com/onur/docs.rs/issues/93
I know this is a really old issue, but I found a way to do it with GitHub's new Actions to Pages functionality. Below is an example, and you can find working documentation hosted on my fork, that was built with GitHub actions.
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Document
run: cargo doc --verbose
- name: Packaging
run: mv target/doc _site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
You (@kvark) have to set it up in the repository settings though.
Most of the project rely on docs.rs for documentation, however it only builds Linux at the moment.
Since this is no longer true, should this issue be closed?
If this still true? The about builds page for docs.rs says:
All targets other than x86_64-unknown-linux-gnu are cross-compiled. For implementation reasons, this is unlikely to change for the foreseeable future.
Correct me if I'm wrong, but wouldn't out-of-ecosystem platform specific libraries still be needed, that couldn't be brought in?
@IsaccBarker would you mind making a PR? What do I need to set up?
I'm able to generate documentation for icrate::Metal, I think the problem is mostly just that you've enabled objc's objc_exception feature, which requires compiling with cc.
I think this can be closed now that #303 landed