An open API service indexing awesome lists of open source software.

https://github.com/ryuapp/fastly-static-site-rust

Static site for Fasly Compute, powered by Rust
https://github.com/ryuapp/fastly-static-site-rust

fastly rust

Last synced: 10 months ago
JSON representation

Static site for Fasly Compute, powered by Rust

Awesome Lists containing this project

README

          

# Fastly Static Site with Rust

An example of static site hosting using Rust and [Fastly Compute](https://www.fastly.com/documentation/guides/compute/). This approach is designed for small static sites.

> [!NOTE]
> Static sites larger than 100MB cannot be served due to Fastly Compute binary size limitations.
> See [Fastly Compute resource limits](https://www.fastly.com/documentation/solutions/tutorials/introduction-to-compute/1-introduction/) for more details.
>
> For larger static sites, consider using [compute-js-static-publish](https://github.com/fastly/compute-js-static-publish) or Fastly KV Store.

## Setup

### Build and Deploy

```bash
# Build
fastly compute build

# Deploy to Fastly
fastly compute deploy
```

## Development

```bash
fastly compute serve
```

Access examples:

- `/` → `index.html`
- `/about` → `about.html`
- `/index.html` → Redirects to `/`
- `/nonexistent` → `404.html`