Add book documentation skeleton and auto-publish from CI (#435)
This commit adds the skeleton of a new set of documentation for `wasmtime` in the existing `docs` directory. This documentation is organized and compiled with [mdbook] which the Rust project uses for most of its own documentation as well. At a previous meeting we brainstormed a rough skeleton of what the documentation in this book would look like, and I've transcribed that here for an example of how this is rendered and how it can be laid out. No actual documentation is written yet. This commit also additionally adds necessary support to auto-publish both this book documentation and API documentation every time a commit is pushed to the `master` branch. All HTML will be automatically pushed to the `gh-pages` branch so long as the CI passes, and this should get deployed to https://cranestation.github.io/wasmtime. I've done a few dry-runs and I think this'll all work, but we'll likely tweak a few things here and there after running this through CI to make sure everything looks just as we'd like. My hope though is that after this lands we can start actually filling out all the documentation and being able to review it as well. [mdbook]: https://crates.io/crates/mdbook
This commit is contained in:
committed by
Till Schneidereit
parent
06e9170f30
commit
bf526b62d3
@@ -151,12 +151,38 @@ jobs:
|
||||
- template: ci/azure-prepare-centos-6.yml
|
||||
- template: ci/azure-build-wheels.yml
|
||||
|
||||
- job: Doc_book
|
||||
displayName: "Doc - build the book"
|
||||
steps:
|
||||
- script: |
|
||||
set -e
|
||||
curl -L https://github.com/rust-lang-nursery/mdBook/releases/download/v0.3.1/mdbook-v0.3.1-x86_64-unknown-linux-gnu.tar.gz | tar xzf -
|
||||
echo "##vso[task.prependpath]$PWD"
|
||||
displayName: "Install mdbook"
|
||||
- script: (cd docs && mdbook build)
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
artifactName: doc_book
|
||||
path: docs/book
|
||||
|
||||
- job: Doc_api
|
||||
displayName: "Doc - build the API documentation"
|
||||
steps:
|
||||
- template: ci/azure-install-rust.yml
|
||||
- script: cargo doc
|
||||
- task: PublishPipelineArtifact@1
|
||||
inputs:
|
||||
artifactName: doc_api
|
||||
path: target/doc
|
||||
|
||||
- job: Publish
|
||||
dependsOn:
|
||||
- Build
|
||||
- Build_wheels
|
||||
- Build_linux
|
||||
- Build_linux_wheels
|
||||
- Doc_book
|
||||
- Doc_api
|
||||
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
||||
steps:
|
||||
# Checking out the sources is needed to be able to delete the "dev" tag, see below.
|
||||
@@ -166,6 +192,21 @@ jobs:
|
||||
- task: DownloadPipelineArtifact@1
|
||||
inputs:
|
||||
targetPath: $(Build.ArtifactStagingDirectory)
|
||||
- script: |
|
||||
set -e
|
||||
mv $(Build.ArtifactStagingDirectory)/doc_book gh-pages
|
||||
mv $(Build.ArtifactStagingDirectory)/doc_api gh-pages/api
|
||||
displayName: Create gh-pages directory
|
||||
- script: |
|
||||
set -e
|
||||
cd gh-pages
|
||||
git init
|
||||
cp ../.git/config .git
|
||||
git add .
|
||||
git -c user.name='ci' -c user.email='ci' commit -m init
|
||||
git push -f -q https://github.com/CraneStation/wasmtime HEAD:gh-pages
|
||||
displayName: Publish gh-pages directory
|
||||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
|
||||
- script: |
|
||||
echo "##vso[task.setvariable variable=tagName;]`echo $BUILD_SOURCEBRANCH | sed -e 's|refs/tags/||'`"
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ cranelift.dbg*
|
||||
rusty-tags.*
|
||||
*~
|
||||
\#*\#
|
||||
docs/book
|
||||
|
||||
35
docs/SUMMARY.md
Normal file
35
docs/SUMMARY.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Summary
|
||||
|
||||
- [Introduction](./introduction.md)
|
||||
- [Tutorial](./tutorial.md)
|
||||
- [Creating `hello-world.wasm`](./tutorial-create-hello-world.md)
|
||||
- [Running `hello-world.wasm`](./tutorial-run-hello-world.md)
|
||||
- [Examples](./examples.md)
|
||||
- [Markdown parser](./examples-markdown.md)
|
||||
- [Using WebAssembly from your lanugage](./lang.md)
|
||||
- [Python](./lang-python.md)
|
||||
- [.NET](./lang-dotnet.md)
|
||||
- [Rust](./lang-rust.md)
|
||||
- [Bash](./lang-bash.md)
|
||||
- [Using the `wasmtime` CLI](./cli.md)
|
||||
- [Installation](./cli-install.md)
|
||||
- [CLI Options](./cli-options.md)
|
||||
- [Cache Configuration](./cli-cache.md)
|
||||
- [Writing WebAssembly](./wasm.md)
|
||||
- [Rust](./wasm-rust.md)
|
||||
- [C/C++](./wasm-c.md)
|
||||
- [Example: Markdown Parser](./wasm-markdown.md)
|
||||
- [Embedding Wasmtime](embed.md)
|
||||
- [Rust API](./embed-rust.md)
|
||||
- [C/C++ API](./embed-c.md)
|
||||
- [Stability](stability.md)
|
||||
- [Release Process](./stability-release.md)
|
||||
- [Platform Support](./stability-platform-support.md)
|
||||
- [Security](security.md)
|
||||
- [Disclosure Policy](./security-disclosure.md)
|
||||
- [Sandboxing](./security-sandboxing.md)
|
||||
- [Contributing](contributing.md)
|
||||
- [Building](./contributing-building.md)
|
||||
- [CI](./contributing-ci.md)
|
||||
- [Governance](./contributing-governance.md)
|
||||
- [Code of Conduct](./contributing-coc.md)
|
||||
5
docs/book.toml
Normal file
5
docs/book.toml
Normal file
@@ -0,0 +1,5 @@
|
||||
[book]
|
||||
authors = ["The Wasmtime Project Developers"]
|
||||
multilingual = false
|
||||
src = "."
|
||||
title = "Wasmtime"
|
||||
3
docs/cli-cache.md
Normal file
3
docs/cli-cache.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Cache Configuration of `wasmtime`
|
||||
|
||||
... more coming soon
|
||||
3
docs/cli-install.md
Normal file
3
docs/cli-install.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Installing `wasmtime`
|
||||
|
||||
... more coming soon
|
||||
3
docs/cli-options.md
Normal file
3
docs/cli-options.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# CLI Options for `wasmtime`
|
||||
|
||||
... more coming soon
|
||||
3
docs/cli.md
Normal file
3
docs/cli.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using the `wasmtime` CLI
|
||||
|
||||
... more coming soon
|
||||
3
docs/contributing-building.md
Normal file
3
docs/contributing-building.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Building
|
||||
|
||||
... more coming soon
|
||||
3
docs/contributing-ci.md
Normal file
3
docs/contributing-ci.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# CI
|
||||
|
||||
... more coming soon
|
||||
3
docs/contributing-coc.md
Normal file
3
docs/contributing-coc.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Code of Conduct
|
||||
|
||||
... more coming soon
|
||||
3
docs/contributing-governance.md
Normal file
3
docs/contributing-governance.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Governance
|
||||
|
||||
... more coming soon
|
||||
3
docs/contributing.md
Normal file
3
docs/contributing.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Contributing
|
||||
|
||||
... more coming soon
|
||||
4
docs/embed-c.md
Normal file
4
docs/embed-c.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# Embedding Wasmtime in C
|
||||
|
||||
... more coming soon
|
||||
|
||||
3
docs/embed-rust.md
Normal file
3
docs/embed-rust.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Embedding Wasmtime in Rust
|
||||
|
||||
... more coming soon
|
||||
3
docs/embed.md
Normal file
3
docs/embed.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Embedding Wasmtime
|
||||
|
||||
... more coming soon
|
||||
3
docs/examples-markdown.md
Normal file
3
docs/examples-markdown.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Markdown Parser
|
||||
|
||||
... more coming soon
|
||||
5
docs/examples.md
Normal file
5
docs/examples.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Examples
|
||||
|
||||
This is an explanation of all examples to come
|
||||
|
||||
... more coming soon
|
||||
3
docs/introduction.md
Normal file
3
docs/introduction.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Introduction
|
||||
|
||||
... more coming soon
|
||||
3
docs/lang-bash.md
Normal file
3
docs/lang-bash.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using WebAssembly from Bash
|
||||
|
||||
... more coming soon
|
||||
3
docs/lang-dotnet.md
Normal file
3
docs/lang-dotnet.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using WebAssembly from .NET
|
||||
|
||||
... more coming soon
|
||||
3
docs/lang-python.md
Normal file
3
docs/lang-python.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using WebAssembly from Python
|
||||
|
||||
... more coming soon
|
||||
3
docs/lang-rust.md
Normal file
3
docs/lang-rust.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using WebAssembly from Rust
|
||||
|
||||
... more coming soon
|
||||
3
docs/lang.md
Normal file
3
docs/lang.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Using WebAssembly from your Language
|
||||
|
||||
... more coming soon
|
||||
3
docs/security-disclosure.md
Normal file
3
docs/security-disclosure.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Disclosure Policy
|
||||
|
||||
... more coming soon
|
||||
3
docs/security-sandboxing.md
Normal file
3
docs/security-sandboxing.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Sandboxing
|
||||
|
||||
... more coming soon
|
||||
3
docs/security.md
Normal file
3
docs/security.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Security
|
||||
|
||||
... more coming soon
|
||||
3
docs/stability-platform-support.md
Normal file
3
docs/stability-platform-support.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Platform Support
|
||||
|
||||
... more coming soon
|
||||
3
docs/stability-release.md
Normal file
3
docs/stability-release.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Release Process
|
||||
|
||||
... more coming soon
|
||||
3
docs/stability.md
Normal file
3
docs/stability.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Stability
|
||||
|
||||
... more coming soon
|
||||
3
docs/tutorial-create-hello-world.md
Normal file
3
docs/tutorial-create-hello-world.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Creating `hello-world.wasm`
|
||||
|
||||
... more coming soon
|
||||
3
docs/tutorial-run-hello-world.md
Normal file
3
docs/tutorial-run-hello-world.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Running `hello-world.wasm` with Wasmtime
|
||||
|
||||
... more coming soon
|
||||
3
docs/tutorial.md
Normal file
3
docs/tutorial.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Tutorial
|
||||
|
||||
... more coming soon
|
||||
1
docs/wasm-c.md
Normal file
1
docs/wasm-c.md
Normal file
@@ -0,0 +1 @@
|
||||
# C/C++
|
||||
1
docs/wasm-markdown.md
Normal file
1
docs/wasm-markdown.md
Normal file
@@ -0,0 +1 @@
|
||||
# Example: Markdown Parser
|
||||
1
docs/wasm-rust.md
Normal file
1
docs/wasm-rust.md
Normal file
@@ -0,0 +1 @@
|
||||
# Rust
|
||||
1
docs/wasm.md
Normal file
1
docs/wasm.md
Normal file
@@ -0,0 +1 @@
|
||||
# Writing WebAssembly
|
||||
Reference in New Issue
Block a user