Skip to content

Commit f3e4964

Browse files
authored
Merge pull request #3 from commontoolsinc/feat/scaffold-workspace
feat: Add demo packages and some docs
2 parents 9eb1307 + b4a1fd5 commit f3e4964

File tree

27 files changed

+2465
-0
lines changed

27 files changed

+2465
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target
2+
.wireit
3+
node_modules
4+
dist

Cargo.lock

Lines changed: 313 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[workspace]
2+
members = [
3+
"rust/example-crate",
4+
]
5+
6+
# See: https://github.com/rust-lang/rust/issues/90148#issuecomment-949194352
7+
resolver = "2"
8+
9+
[workspace.dependencies]
10+
js-sys = { version = "0.3" }
11+
tracing = { version = "0.1" }
12+
tracing-subscriber = { version = "0.3", features = ["env-filter", "tracing-log", "json"] }
13+
tracing-web = { version = "0.1" }
14+
wasm-bindgen = { version = "0.2" }
15+
web-sys = { version = "0.3" }
16+
wit-bindgen = { version = "0.24" }
17+
18+
[profile.release]
19+
opt-level = 'z'
20+
lto = true

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Common Labs
2+
3+
Radioactive experiments. Turn back! You will find no API stability here.
4+
5+
![A loom, by Midjourney](./docs/images/loom.jpg)
6+
7+
## Overview
8+
9+
Web, Node.js an Deno packages live in [./typescript](./typescript)
10+
11+
Rust crates live in [./rust](./rust)
12+
13+
Refer to [./docs/tools.md](./docs/tools.md) for tool installation.
14+
15+
Run [./scripts/component-demo.sh](./scripts/component-demo.sh) to see some fun Rust / Deno / Web tooling interop in action.

docs/images/loom.jpg

631 KB
Loading

docs/tools.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Toolchains / runtimes
2+
3+
- [Rust][rustup]
4+
- [Deno][deno]
5+
- [Node.js][nvm]
6+
7+
### Rust toolchain variations
8+
9+
`rustup target add wasm32-wasi`
10+
11+
## Other tools
12+
13+
- [wasm-tools][wasm-tools]: `cargo install wasm-tools`
14+
- [jco][jco]: `npm install @bytecodealliance/jco`
15+
16+
[rustup]: https://rustup.rs/
17+
[deno]: https://docs.deno.com/runtime/manual/getting_started/installation
18+
[nvm]: https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
19+
[wasm-tools]: https://github.com/bytecodealliance/wasm-tools
20+
[jco]: https://github.com/bytecodealliance/jco

rust/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Rust
2+
3+
This workspace contains Rust that at times may run on native targets, the web, Deno, Node.js or arbitrary Wasm runtimes.
4+

0 commit comments

Comments
 (0)