mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Configure cursor
This commit is contained in:
26
.cursor/Dockerfile
Normal file
26
.cursor/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM ghcr.io/oven-sh/bun-development-docker-image:prebuilt
|
||||
|
||||
# Create a non-root user for development
|
||||
RUN useradd -m -s /bin/bash ubuntu
|
||||
|
||||
# Create workspace directory and give ubuntu user access
|
||||
RUN mkdir -p /workspace && \
|
||||
chown -R ubuntu:ubuntu /workspace && \
|
||||
# Allow ubuntu user to use sudo without password for development tasks
|
||||
apt-get update && apt-get install -y sudo && \
|
||||
echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set the user and working directory
|
||||
USER ubuntu
|
||||
WORKDIR /workspace/bun
|
||||
|
||||
# Configure Git for the ubuntu user (agents often need this)
|
||||
RUN git config --global user.name "Background Agent" && \
|
||||
git config --global user.email "agent@cursor.com" && \
|
||||
git config --global init.defaultBranch main
|
||||
|
||||
# Ensure PATH includes Bun binaries for the ubuntu user
|
||||
ENV PATH="/workspace/bun/build/debug:/workspace/bun/build/release:/usr/local/bin:${PATH}"
|
||||
|
||||
RUN git pull
|
||||
7
.cursor/environment.json
Normal file
7
.cursor/environment.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": ".cursor/Dockerfile",
|
||||
"context": "."
|
||||
},
|
||||
"terminals": []
|
||||
}
|
||||
@@ -1,27 +1,13 @@
|
||||
---
|
||||
description: How to build Bun
|
||||
globs:
|
||||
globs:
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# How to build Bun
|
||||
|
||||
## CMake
|
||||
Run:
|
||||
|
||||
Bun is built using CMake, which you can find in `CMakeLists.txt` and in the `cmake/` directory.
|
||||
|
||||
* `CMakeLists.txt`
|
||||
* `cmake/`
|
||||
* `Globals.cmake` - macros and functions used by all the other files
|
||||
* `Options.cmake` - build options for configuring the build (e.g. debug/release mode)
|
||||
* `CompilerFlags.cmake` - compiler and linker flags used by all the targets
|
||||
* `tools/` - setup scripts for various build tools (e.g. llvm, zig, webkit, rust, etc.)
|
||||
* `targets/` - targets for bun and its dependencies (e.g. brotli, boringssl, libuv, etc.)
|
||||
|
||||
## How to
|
||||
|
||||
There are `package.json` scripts that make it easy to build Bun without calling CMake directly, for example:
|
||||
|
||||
```sh
|
||||
bun run build # builds a debug build: `build/debug/bun-debug`
|
||||
bun run build:release # builds a release build: `build/release/bun`
|
||||
bun run build:assert # builds a release build with debug assertions: `build/assert/bun`
|
||||
```bash
|
||||
bun bd
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user