Skip to content

Commit 8a7158e

Browse files
authored
Merge pull request #41 from DebugSteven/conglomerate
rustwasm bookshelf
2 parents 6455f45 + 7937db0 commit 8a7158e

File tree

10 files changed

+225
-70
lines changed

10 files changed

+225
-70
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ _site
33
.jekyll-metadata
44
.bundle
55
vendor
6+
repos/wasm-bindgen
7+
repos/book
8+
repos/wasm-pack
9+
_site
10+
_build.yml

Diff for: .travis.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: rust
2+
3+
before_install:
4+
- curl -L https://github.com/rust-lang-nursery/mdBook/releases/download/v0.2.1/mdbook-v0.2.1-x86_64-unknown-linux-musl.tar.gz | tar xzf -
5+
- export PATH=$PATH:`pwd`
6+
- bundler install
7+
8+
script:
9+
- ./ci/build.sh
10+
11+
deploy:
12+
provider: script
13+
script: curl -LsSf https://git.io/fhJ8n | rustc - && (cd _site && ../rust_out)
14+
skip_cleanup: true
15+
on:
16+
branch: master

Diff for: _config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ plugins:
3333
exclude:
3434
- template.md
3535
- vendor/bundle/
36+
- repos
3637
# - Gemfile
3738
# - Gemfile.lock
3839
# - node_modules

Diff for: _includes/header.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
</label>
2323

2424
<div class="trigger">
25-
<a class="page-link" href="https://rustwasm.github.io/book/">📚 Learn</a>
25+
<a class="page-link" href="/docs.html">📚 Learn</a>
26+
<a class="page-link" href="/">📖 Blog</a>
2627
<a class="page-link" href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">👯 Get Involved</a>
2728
{%- for path in page_paths -%}
2829
{%- assign my_page = site.pages | where: "path", path | first -%}

Diff for: _layouts/default.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
{%- include header.html -%}
99

1010
<main class="page-content" aria-label="Content">
11+
{%- if layout.unwrapped -%}
12+
{{ content }}
13+
{%- else -%}
1114
<div class="wrapper">
1215
{{ content }}
1316
</div>
17+
{%- endif -%}
1418
</main>
1519

1620
{%- include footer.html -%}
@@ -19,4 +23,4 @@
1923

2024
</body>
2125

22-
</html>
26+
</html>

Diff for: _layouts/home.html

+48-68
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,51 @@
11
---
2+
layout: default
3+
unwrapped: true
24
---
3-
4-
<!DOCTYPE html>
5-
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
6-
7-
{%- include head.html -%}
8-
9-
<body>
10-
11-
{%- include header.html -%}
12-
13-
<main class="page-content" aria-label="Content">
14-
<div class="home">
15-
{%- if page.title -%}
16-
<h1 class="page-heading">{{ page.title }}</h1>
5+
{%- if page.title -%}
6+
<h1 class="page-heading">{{ page.title }}</h1>
7+
{%- endif -%}
8+
9+
<section id="call-to-action">
10+
<div class="wrapper">
11+
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
12+
<h2>Learn Rust and WebAssembly</h2>
13+
<p>
14+
<a href="docs.html">Read the Rust and WebAssembly documentation</a> to
15+
learn how to design, develop, test, debug, profile, and publish Rust and
16+
WebAssembly libraries and applications.
17+
</p>
18+
<h2>Get Involved</h2>
19+
<p>
20+
<a href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">Join the Rust and WebAssembly domain working group!</a> Help us craft the future of Rust and WebAssembly.
21+
</p>
22+
</div>
23+
</section>
24+
25+
<div class="wrapper">
26+
{{ content }}
27+
28+
{%- if site.posts.size > 0 -%}
29+
<section>
30+
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
31+
<ul class="post-list">
32+
{%- for post in site.posts -%}
33+
<li>
34+
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
35+
<span class="post-meta">{{ post.date | date: date_format }}</span>
36+
<h3>
37+
<a class="post-link" href="{{ post.url | relative_url }}">
38+
{{ post.title | escape }}
39+
</a>
40+
</h3>
41+
{%- if site.show_excerpts -%}
42+
{{ post.excerpt }}
1743
{%- endif -%}
18-
19-
<section id="call-to-action">
20-
<div class="wrapper">
21-
<img src="{{ "/assets/wasm-ferris.png" | relative_url }}"/>
22-
<h2>Learn Rust and WebAssembly</h2>
23-
<p>
24-
<a href="https://rustwasm.github.io/book/">Read the Rust and WebAssembly book</a> to
25-
learn how to design, develop, test, debug, profile, and publish Rust and
26-
WebAssembly libraries and applications.
27-
</p>
28-
<h2>Get Involved</h2>
29-
<p>
30-
<a href="https://github.com/rustwasm/team/blob/master/README.md#get-involved">Join the Rust and WebAssembly domain working group!</a> Help us craft the future of Rust and WebAssembly.
31-
</p>
32-
</div>
33-
</section>
34-
35-
{{ content }}
36-
37-
<div class="wrapper">
38-
{%- if site.posts.size > 0 -%}
39-
<section>
40-
<h2 class="post-list-heading">{{ page.list_title | default: "Blog Posts" }}</h2>
41-
<ul class="post-list">
42-
{%- for post in site.posts -%}
43-
<li>
44-
{%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
45-
<span class="post-meta">{{ post.date | date: date_format }}</span>
46-
<h3>
47-
<a class="post-link" href="{{ post.url | relative_url }}">
48-
{{ post.title | escape }}
49-
</a>
50-
</h3>
51-
{%- if site.show_excerpts -%}
52-
{{ post.excerpt }}
53-
{%- endif -%}
54-
</li>
55-
{%- endfor -%}
56-
</ul>
57-
58-
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
59-
</section>
60-
{%- endif -%}
61-
</div>
62-
</div>
63-
</main>
64-
65-
{%- include footer.html -%}
66-
67-
{%- include analytics.html -%}
68-
69-
</body>
70-
71-
</html>
44+
</li>
45+
{%- endfor -%}
46+
</ul>
47+
48+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
49+
</section>
50+
{%- endif -%}
51+
</div>

Diff for: assets/extra.css

+20
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,23 @@
2323
section {
2424
clear: both;
2525
}
26+
27+
#installer {
28+
text-align: center;
29+
}
30+
31+
#installer .button {
32+
background-color: #6556EC;
33+
border-color: #6556EC;
34+
height: 20%;
35+
font-size: 1.8rem;
36+
padding: 1.8rem;
37+
color: #fff;
38+
font-weight: 600;
39+
line-height: 38px;
40+
border-radius: 4px;
41+
display: inline-block;
42+
}
43+
#installer .button:hover {
44+
text-decoration: none;
45+
}

Diff for: ci/build.sh

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
set -ex
3+
4+
mkdir -p repos
5+
6+
if [ ! -d repos/wasm-bindgen ]; then
7+
git clone https://github.com/rustwasm/wasm-bindgen repos/wasm-bindgen
8+
fi
9+
if [ ! -d repos/wasm-pack ]; then
10+
git clone https://github.com/rustwasm/wasm-pack repos/wasm-pack
11+
fi
12+
if [ ! -d repos/book ]; then
13+
git clone https://github.com/rustwasm/book repos/book
14+
fi
15+
16+
wasm_bindgen_tag=$(cd repos/wasm-bindgen && git describe --abbrev=0 --tags)
17+
wasm_pack_tag=$(cd repos/wasm-pack && git describe --abbrev=0 --tags)
18+
19+
(cd repos/wasm-bindgen && git reset --hard $wasm_bindgen_tag)
20+
(cd repos/wasm-pack && git reset --hard $wasm_pack_tag)
21+
22+
wasm_pack_publish_date=$(date -d "@$(cd repos/wasm-pack && git show -s --format=%at)" "+%b %e")
23+
24+
echo "wasm-pack-tag: $wasm_pack_tag" >> _build.yml
25+
echo "wasm-pack-publish-date: $wasm_pack_publish_date" >> _build.yml
26+
27+
bundler exec jekyll build --config _config.yml,_build.yml
28+
29+
mkdir -p _site/docs
30+
mdbook build repos/wasm-bindgen/guide
31+
mv repos/wasm-bindgen/guide/book _site/docs/wasm-bindgen
32+
33+
mdbook build repos/wasm-pack/docs
34+
mv repos/wasm-pack/docs/book _site/docs/wasm-pack
35+
36+
mdbook build repos/book
37+
mv repos/book/book _site/docs/book
38+

Diff for: docs.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
% Rust and WebAssembly Documentation
2+
3+
<style>
4+
nav {
5+
display: none;
6+
}
7+
#search-input {
8+
width: calc(100% - 58px);
9+
}
10+
#search-but {
11+
cursor: pointer;
12+
}
13+
#search-but, #search-input {
14+
padding: 4px;
15+
border: 1px solid #ccc;
16+
border-radius: 3px;
17+
outline: none;
18+
font-size: 0.7em;
19+
background-color: #fff;
20+
}
21+
#search-but:hover, #search-input:focus {
22+
border-color: #55a9ff;
23+
}
24+
h2 {
25+
font-size: 18px;
26+
}
27+
</style>
28+
29+
Welcome to an overview of the documentation provided by the [Rust
30+
and WebAssembly Working Group](https://github.com/rustwasm). All of these
31+
projects are managed by the working group; there are other unofficial
32+
documentation resources as well!
33+
34+
Many of these resources take the form of "books"; we collectively call
35+
these "The Rust and WebAssembly Bookshelf." Some are large, some are small.
36+
37+
# Learn about Rust and WebAssembly
38+
39+
If you'd like to learn about Rust and WebAssembly, this is the spot for
40+
you! All of these resources assume that you have programmed a little bit
41+
of Rust and that you have some familiarity with JavaScript. If you want
42+
to learn how to use Rust in your web browser, these resources are a
43+
great place to get started:
44+
45+
## The Rust Wasm Book
46+
47+
[The Rust Wasm Book](docs/book) describes how to use Rust and
48+
WebAssembly together. There's a tutorial to create an end to end project
49+
using Rust and WebAssembly and finally the book concludes with reference
50+
sections full of general, good-to-know information to explore more
51+
with Rust and WebAssembly.
52+
53+
# Dive Into Rust and WebAssembly
54+
55+
If you'd like a deeper dive into Rust and WebAssembly, these resources
56+
are for you. These books are good to look into after you've gone through
57+
the tutorial in [The Rust Wasm Book](docs/book) or you already have some
58+
familiarity with Rust, WebAssembly, and JavaScript. These books go into
59+
more depth about the Rust WebAssesmbly tools and crates.
60+
61+
## The `wasm-bindgen` Guide
62+
63+
[The `wasm-bindgen` Guide](docs/wasm-bindgen) covers the `wasm-bindgen`
64+
tool and crate. `wasm-bindgen` is a Rust library and CLI tool that
65+
facilitate high-level interactions between wasm modules and JavaScript.
66+
This is great to read if you're seeking more information about how
67+
`wasm-bindgen` works, what more you can do with it, and other references
68+
for the `wasm-bindgen` tool and related crates. There's also information
69+
on how you can contribute to the `wasm-bindgen` tool, if you're
70+
curious.
71+
72+
## The `wasm-pack` Book
73+
74+
[The `wasm-pack` Book](docs/wasm-pack) covers the Rust to WebAssembly
75+
workflow tool. This book covers prerequistes, project setup, and
76+
available commands for `wasm-pack`. The `wasm-pack` book has quick start
77+
guides to using generated templates and highlights how the workflow with
78+
those templates works so you can get a working Rust and WebAssembly
79+
project up, running, and deployed fast. If you're interested in
80+
contributing to `wasm-pack`, you will find all that information at the
81+
end of this book too!

Diff for: index.md

+9
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
55
layout: home
66
---
7+
8+
<div id="installer">
9+
<a class="button button-primary" href="https://rustwasm.github.io/wasm-pack/installer">✨ Install wasm-pack 0.6.0 ✨</a>
10+
<p>{{ site.wasm-pack-publish-date }} |
11+
<a href="https://github.com/rustwasm/wasm-pack/releases/tag/{{- site.wasm-pack-tag -}}">
12+
Release Notes
13+
</a>
14+
</p>
15+
</div>

0 commit comments

Comments
 (0)