Skip to content

Commit 280a9c3

Browse files
committed
clean up readme and .gitignore
1 parent 9514e42 commit 280a9c3

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ target/
1010
dist/
1111
node_modules/
1212
.vercel/
13-
14-
fixtures/**/vercel.json

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
<p align="center">
2-
<a href="https://vercel.com">
2+
<a align="center" href="https://vercel.com">
33
<img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
44
<h3 align="center">Rust</h3>
55
</a>
6-
<p align="center">Rust runtime for Vercel Functions.</p>
6+
<p align="center">Rust Runtime for Vercel Functions.</p>
77
</p>
88

9+
<div align="center">
10+
11+
<a href="https://www.npmjs.com/package/vercel-rust">![npm version](https://img.shields.io/npm/v/vercel-rust.svg)</a>
12+
<a href="https://www.npmjs.com/package/vercel-rust">![npm downloads](https://img.shields.io/npm/dm/vercel-rust.svg?label=npm%20downloads)</a>
13+
<a href="https://crates.io/crates/vercel_runtime">![crates.io downloads](https://img.shields.io/crates/d/vercel_runtime?color=yellow&label=crates.io)</a>
14+
</div>
15+
16+
<div align="center">
17+
918
Community-maintained package to support using [Rust](https://www.rust-lang.org/) inside [Vercel Functions](https://vercel.com/docs/serverless-functions/introduction) as a [Runtime](https://vercel.com/docs/runtimes).
1019

20+
</div>
21+
1122
## Legacy Runtime
1223

1324
The below documentation is for the `vercel_runtime` crate (in beta). If you are looking for the legacy runtime instructions using `vercel_lambda` see [tree/a9495a0](https://github.com/vercel-community/rust/tree/a9495a0f0d882a36ea165f1629fcc79c30bc3108).
@@ -59,7 +70,8 @@ Finally we need a `Cargo.toml` file at the root of your repository.
5970
# --snip--
6071

6172
[dependencies]
62-
# --snip--
73+
tokio = { version = "1", features = ["macros"] }
74+
serde_json = { version = "1", features = ["raw_value"] }
6375
# Documentation: https://docs.rs/vercel_runtime/latest/vercel_runtime
6476
vercel_runtime = { version = "0.2.1" }
6577

@@ -81,7 +93,6 @@ path = "api/user/[id].rs"
8193
name = "group-id"
8294
path = "api/group/[id].rs"
8395

84-
8596
# --snip--
8697
```
8798

@@ -99,13 +110,12 @@ During local development with `vercel dev`, ensure `rust` and `cargo` are alread
99110

100111
## Contributing
101112

102-
Since this project contains both Rust and Node.js code, you need to install the relevant dependencies. If you're only working on the JavaScript side, you only need to install those dependencies (and vice-versa).
113+
Since this project contains both Rust and Node.js code, you need to install the relevant dependencies. If you're only working on the TypeScript side, you only need to install those dependencies (and vice-versa).
103114

104115
```shell
105116
# install node dependencies
106117
pnpm install
107118

108-
109119
# install cargo dependencies
110120
cargo fetch
111121
```
@@ -121,6 +131,13 @@ graph TD
121131

122132
## FAQ
123133

134+
<details>
135+
<summary>How to specify toolchain overrides</summary>
136+
137+
An example on how this can be achieved is using a `rust-toolchain` file adjacent to your `Cargo.toml`. Please refer to [Rust Documentation](https://rust-lang.github.io/rustup/overrides.html#the-toolchain-file) for more details.
138+
139+
</details>
140+
124141
<details>
125142
<summary>Can I use musl/static linking?</summary>
126143

0 commit comments

Comments
 (0)