Skip to content

Commit f7058d5

Browse files
committed
Gloo v0.6.0
1 parent e482f2e commit f7058d5

File tree

18 files changed

+4014
-4008
lines changed

18 files changed

+4014
-4008
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2018"
55
license = "MIT/Apache-2.0"
66
name = "gloo"
77
readme = "README.md"
8-
version = "0.5.0"
8+
version = "0.6.0"
99
repository = "https://github.com/rustwasm/gloo"
1010
homepage = "https://gloo-rs.web.app/"
1111
documentation = "https://docs.rs/gloo/"
@@ -21,7 +21,7 @@ gloo-render = { version = "0.1.0", path = "crates/render" }
2121
gloo-console = { version = "0.2.1", path = "crates/console" }
2222
gloo-utils = { version = "0.1.1", path = "crates/utils" }
2323
gloo-history = { version = "0.1.0", path = "crates/history" }
24-
gloo-worker = { path = "crates/worker" }
24+
gloo-worker = { version = "0.1.0", path = "crates/worker" }
2525

2626
[features]
2727
default = []

crates/utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gloo-utils"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2018"
55
description = "Convenience crate for common `web_sys` features"
66
authors = ["Rust and WebAssembly Working Group"]

crates/worker/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div align="center">
2+
3+
<h1><code>gloo-worker</code></h1>
4+
5+
<p>
6+
<a href="https://crates.io/crates/gloo-worker"><img src="https://img.shields.io/crates/v/gloo-worker.svg?style=flat-square" alt="Crates.io version" /></a>
7+
<a href="https://crates.io/crates/gloo-worker"><img src="https://img.shields.io/crates/d/gloo-worker.svg?style=flat-square" alt="Download" /></a>
8+
<a href="https://docs.rs/gloo-worker"><img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square" alt="docs.rs docs" /></a>
9+
</p>
10+
11+
<h3>
12+
<a href="https://docs.rs/gloo-worker">API Docs</a>
13+
<span> | </span>
14+
<a href="https://github.com/rustwasm/gloo/blob/master/CONTRIBUTING.md">Contributing</a>
15+
<span> | </span>
16+
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
17+
</h3>
18+
19+
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
20+
</div>
21+
22+
Gloo workers are a way to offload tasks to web workers. These are run concurrently using
23+
[web-workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers).
24+
It provides a neat abstraction over the browser's Web Workers API which can be consumed from anywhere.

website/blog/2022-1-22-new-release.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
slug: release-0.6.0
3+
title: Releasing v0.6.0
4+
author: Muhammad Hamza
5+
author_title: Maintainer of Gloo
6+
author_url: https://github.com/hamza1311
7+
author_image_url: https://avatars.githubusercontent.com/u/47357913?v=4
8+
tags: [release]
9+
---
10+
11+
The Gloo team is happy to announce a new version of Gloo: v0.6.0. Gloo is a modular toolkit for building fast, reliable
12+
Web applications and libraries with Rust and WASM.
13+
14+
## What's new
15+
16+
This release focuses on adding new features and crates.
17+
18+
### New crate: `gloo-worker`
19+
20+
Gloo workers are a way to offload tasks to web workers. These are run concurrently using
21+
[web-workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers).
22+
23+
This feature has been requested and overdue for a while. Gloo-worker is made by
24+
moving [`yew-agent`](https://yew.rs/docs/concepts/agents) to Gloo, while making it framework independent in the process.
25+
This allows us to have a neat abstraction over the browser's Web Workers API which can be consumed from anywhere.
26+
27+
### Features
28+
29+
This release has been light on new features. The only improvement is `gloo_utils` now providing a new wrapper
30+
to obtain the document `head`.
31+
32+
## Notable mention from last release
33+
34+
Last release, Gloo v0.5.0 did not receive its own blog post. That released introduced one major new crate: `gloo-history`
35+
amongst other small improvements, which can be found in the [GitHub changelog](https://github.com/rustwasm/gloo/releases/tag/0.5.0).
36+
37+
### `gloo-history`
38+
39+
Gloo history provides wrappers for browser's history API. It exposes ergonomic Rust APIs for the browser's APIs which
40+
can be used to build other tools. In fact, [`yew-router`](https://github.com/yewstack/yew/pull/2239) has been
41+
reworked to use `gloo-history` under-the-hood.
42+
43+
## Looking for contributors
44+
45+
Gloo project is in need of contributors. It would be really appreciated if you could contribute or raise awareness about
46+
the Gloo project.

website/docs/console/intro.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

website/docs/dialog/intro.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

website/docs/event/intro.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

website/docs/file/intro.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

website/docs/getting-started.mdx

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: "Getting Started"
3+
description: "Using the Gloo toolkit"
4+
---
5+
6+
## Using the Whole Toolkit
7+
8+
Using the whole toolkit via the umbrella `gloo` crate lets you hit the ground
9+
running, with everything at your fingertips. This is a good choice for people
10+
making Web applications, or top-level crates that are compiled into Wasm
11+
binaries.
12+
13+
### `Cargo.toml`
14+
15+
Add a `gloo` dependency to your `Cargo.toml`:
16+
17+
```toml
18+
[dependencies]
19+
gloo = "0.3"
20+
```
21+
22+
### `src/lib.rs`
23+
24+
Use various bits of `gloo` via its submodules, for example timers and intervals
25+
are in `gloo::timers` and event listeners are in `gloo::events`:
26+
27+
```rust
28+
use gloo::{timers, events};
29+
30+
// ...
31+
```
32+
33+
## Using a Single Crate
34+
35+
Each crate in the Gloo toolkit can also be used independently from the rest of
36+
the toolkit. This is a good choice for people making library crates that are
37+
intended to be used by other people making Web applications or top-level crates
38+
that are compiled into Wasm binaries.
39+
40+
### `Cargo.toml`
41+
42+
If we want to use only the Gloo functionality that wraps `setTimeout`, we can
43+
add `gloo-timers` to our dependencies in `Cargo.toml`:
44+
45+
```toml
46+
[dependencies]
47+
gloo-timers = "0.2"
48+
```
49+
50+
### `src/lib.rs`
51+
52+
Next, import the functionality you need from the `gloo_timers` crate, and go to
53+
town with it:
54+
55+
```rust
56+
use gloo_timers::callback::Timeout;
57+
58+
// ...
59+
```

website/docs/history/intro.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

website/docs/storage/intro.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

website/docs/timer/intro.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

website/docs/utils/intro.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

website/docusaurus.config.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,6 @@ module.exports = {
2020
src: 'img/logo.svg',
2121
},
2222
items: [
23-
{
24-
position: 'left',
25-
label: 'Crates',
26-
items: [
27-
{
28-
label: 'Console',
29-
href: '/docs/console'
30-
},
31-
{
32-
label: 'Dialog',
33-
href: '/docs/dialog'
34-
},
35-
{
36-
label: 'Events',
37-
href: '/docs/event'
38-
},
39-
{
40-
label: 'File',
41-
href: '/docs/file'
42-
},
43-
{
44-
label: 'Storage',
45-
href: '/docs/storage'
46-
},
47-
{
48-
label: 'Timer',
49-
href: '/docs/timer'
50-
},
51-
{
52-
label: 'Utils',
53-
href: '/docs/utils'
54-
},
55-
]
56-
},
5723
{to: '/blog', label: 'Blog', position: 'left'},
5824
{
5925
href: 'https://docs.rs/gloo',

0 commit comments

Comments
 (0)