Skip to content

feat(rust): shared build directory #5610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions backend/windmill-worker/nsjail/download.rust.config.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: "rust download script"

mode: ONCE
hostname: "rust"
log_level: ERROR

disable_rl: true

cwd: "/tmp"

clone_newnet: false

keep_caps: false
keep_env: true
mount_proc: true

mount {
src: "/bin"
dst: "/bin"
is_bind: true
}

mount {
src: "/lib"
dst: "/lib"
is_bind: true
}


mount {
src: "/lib64"
dst: "/lib64"
is_bind: true
mandatory: false
}


mount {
src: "/usr"
dst: "/usr"
is_bind: true
}

mount {
src: "/dev/null"
dst: "/dev/null"
is_bind: true
rw: true
}

mount {
dst: "/tmp"
fstype: "tmpfs"
rw: true
options: "size=500000000"
}

mount {
src: "/etc"
dst: "/etc"
is_bind: true
}

mount {
src: "/dev/random"
dst: "/dev/random"
is_bind: true
}
mount {
src: "{JOB_DIR}"
dst: "/tmp"
is_bind: true
rw: true
}

mount {
src: "/dev/urandom"
dst: "/dev/urandom"
is_bind: true
}

iface_no_lo: true

mount {
src: "{BUILD}"
dst: "{BUILD}"
is_bind: true
mandatory: false
rw: true
}
mount {
src: "{CARGO_HOME}"
dst: "{CARGO_HOME}"
is_bind: true
# Readonly
rw: false
}

mount {
src: "{BUILD}/registry"
dst: "{CARGO_HOME}/registry"
is_bind: true
mandatory: true
# Read-write
rw: true
}

mount {
src: "{BUILD}/git"
dst: "{CARGO_HOME}/git"
is_bind: true
mandatory: true
# Read-write
rw: true
}

{DEV}
3 changes: 3 additions & 0 deletions backend/windmill-worker/nsjail/run.rust.config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,6 @@ mount {
}

{SHARED_MOUNT}

{DEV}

Loading