metal-rs icon indicating copy to clipboard operation
metal-rs copied to clipboard

Host documentation

Open kvark opened this issue 8 years ago • 2 comments

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

kvark avatar Jul 12 '17 18:07 kvark

Related - https://github.com/onur/docs.rs/pull/73

kvark avatar Jul 12 '17 18:07 kvark

Also related to this: https://github.com/onur/docs.rs/issues/93

mjadczak avatar Mar 01 '18 22:03 mjadczak

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.

olivia-banks avatar Dec 10 '22 16:12 olivia-banks

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?

notgull avatar Dec 10 '22 18:12 notgull

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?

olivia-banks avatar Dec 11 '22 05:12 olivia-banks

@IsaccBarker would you mind making a PR? What do I need to set up?

kvark avatar Mar 04 '23 05:03 kvark

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.

madsmtm avatar Mar 04 '23 09:03 madsmtm

I think this can be closed now that #303 landed

cwfitzgerald avatar Feb 27 '24 18:02 cwfitzgerald