Skip to content

Commit 0cc008d

Browse files
committed
readme: note bun caveats
1 parent 6c793a4 commit 0cc008d

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,39 @@ SPDX-FileCopyrightText: 2024 aoife cassidy <[email protected]>
55
SPDX-License-Identifier: Apache-2.0
66
-->
77

8-
# @livekit/agents
8+
# aikit-js
99

1010
This is a Node port of the [LiveKit Agents framework](https://livekit.io/agents), originally written in Python.
1111

12+
## Development
13+
This project builds to Node-compatible JavaScript, but is developed using the faster [Bun](https://bun.sh) JavaScript runtime. As a superset of Node, there are some caveats:
14+
15+
- Bun uses `package.json#workspaces` for monorepo handling, while pnpm uses `pnpm-workspace.yaml`. Using pnpm will therefore generate a new `node_modules/` for every subpackage.
16+
- Running the `build` script invokes the [considerably faster](https://bun.sh/images/bundler-speed.png) `Bun.build` bundler, as opposed to running `tsc`.
17+
- Other incompatibilities which may be added to the project at any time
18+
19+
For this reason, while it should be possible to use npm, yarn, or pnpm with minor modifications to the builder, it is advised to install Bun.
20+
1221
## Building
13-
While any Node- or npm-compatible package manager should theoretically work for hacking on this project, the author uses the [bun](https://bun.sh) runtime.
22+
23+
This project depends on an as-yet-unreleased version of `@livekit/rtc-node`. Thankfully, Bun allows us to easily link to local repositories:
24+
25+
```sh
26+
~$ cd ~/src/node-sdks-temp/rtc-node
27+
rtc-node$ bun link
28+
Success! Registered "@livekit/rtc-node"
29+
30+
rtc-node$ cd ~/src/aikit-js
31+
aikit-js$ bun link @livekit/rtc-node
32+
```
33+
34+
This will not add the package to `package.json`, however it will be imported and ready to use. Now you can build the project:
35+
36+
```sh
37+
$ cd agents && bun run build
38+
```
39+
40+
Your output will be in the `dist/` directory.
1441

1542
## License
1643
This project is licensed under `Apache-2.0`, and is [REUSE-3.0](https://reuse.software) compliant. Refer to [the license](LICENSES/Apache-2.0.txt) for details.

0 commit comments

Comments
 (0)