From 3aa711bccf9b09aa602e4a029a15b233f109a5c3 Mon Sep 17 00:00:00 2001 From: Ben Hansen Date: Sat, 19 Oct 2019 15:17:15 -0600 Subject: [PATCH] Introduction and config stuff --- deploy.sh | 25 +++++++++++++++++++++++++ docs/.vuepress/config.js | 4 +++- docs/.vuepress/dist | 1 + docs/README.md | 12 +++++++++++- 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100755 deploy.sh create mode 160000 docs/.vuepress/dist diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 00000000..ce09ef03 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env sh + +# abort on errors +set -e + +# build +npm run docs:build + +# navigate into the build output directory +cd docs/.vuepress/dist + +# if you are deploying to a custom domain +# echo 'www.example.com' > CNAME + +git init +git add -A +git commit -m 'deploy' + +# if you are deploying to https://.github.io +# git push -f git@github.com:/.github.io.git master + +# if you are deploying to https://.github.io/ +git push -f git@github.com:sotrh/learn-wgpu.git master:gh-pages + +cd - \ No newline at end of file diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 8d6369eb..a75cb902 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,6 +1,8 @@ module.exports = { + base: '/learn-wgpu/', themeConfig: { - displayAllHeaders: true, + displayAllHeaders: false, + lastUpdated: 'Last Updated', sidebar: [ '/', { diff --git a/docs/.vuepress/dist b/docs/.vuepress/dist new file mode 160000 index 00000000..86bf1611 --- /dev/null +++ b/docs/.vuepress/dist @@ -0,0 +1 @@ +Subproject commit 86bf16112101531159df6609e990ce7deadc2e01 diff --git a/docs/README.md b/docs/README.md index f6ecaa67..6f6ed5af 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1 +1,11 @@ -# Introduction \ No newline at end of file +# Introduction + +## What is wgpu? +[Wgpu](https://github.com/gfx-rs/wgpu) is a Rust implementation of the [WebGPU API spec](https://gpuweb.github.io/gpuweb/). WebGPU is a specification published by the GPU for the Web Community Group. It aims to allow web code access to GPU functions in a safe and reliable manner. It does this by mimicking the Vulkan API, and translating that down to whatever API the host hardware is using (ie. DirectX, Metal, Vulkan, OpenGL*). + +Wgpu is still in development, so some of this doc is subject to change. + +## Why Rust? +Wgpu actually has C bindings to allow you to write C/C++ code with it, as well as use other languages that interface with C. That being said, wgpu is written in Rust, and it has some convient Rust Bindings that don't have to jump through any hoops. On top of that, I've been enjoying writing in Rust. + +I'm using this project as a way to learn wgpu myself, so I might miss some important details, or explain things wrong. I'm always open to constructive feedback. That being said, let's get started! \ No newline at end of file