Skip to content

Commit ed61d97

Browse files
feat(rust): shared build directory (#5610)
* feat: rust incremental compilation * update dockerfiles * fix compilation error * add windows flags * init * polishing * update * return mount-point * Update backend/windmill-worker/src/rust_executor.rs Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * share worker dir if nsjail off * final refactor --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 75fa9e4 commit ed61d97

File tree

7 files changed

+349
-40
lines changed

7 files changed

+349
-40
lines changed
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: "rust download script"
2+
3+
mode: ONCE
4+
hostname: "rust"
5+
log_level: ERROR
6+
7+
disable_rl: true
8+
9+
cwd: "/tmp"
10+
11+
clone_newnet: false
12+
13+
keep_caps: false
14+
keep_env: true
15+
mount_proc: true
16+
17+
mount {
18+
src: "/bin"
19+
dst: "/bin"
20+
is_bind: true
21+
}
22+
23+
mount {
24+
src: "/lib"
25+
dst: "/lib"
26+
is_bind: true
27+
}
28+
29+
30+
mount {
31+
src: "/lib64"
32+
dst: "/lib64"
33+
is_bind: true
34+
mandatory: false
35+
}
36+
37+
38+
mount {
39+
src: "/usr"
40+
dst: "/usr"
41+
is_bind: true
42+
}
43+
44+
mount {
45+
src: "/dev/null"
46+
dst: "/dev/null"
47+
is_bind: true
48+
rw: true
49+
}
50+
51+
mount {
52+
dst: "/tmp"
53+
fstype: "tmpfs"
54+
rw: true
55+
options: "size=500000000"
56+
}
57+
58+
mount {
59+
src: "/etc"
60+
dst: "/etc"
61+
is_bind: true
62+
}
63+
64+
mount {
65+
src: "/dev/random"
66+
dst: "/dev/random"
67+
is_bind: true
68+
}
69+
mount {
70+
src: "{JOB_DIR}"
71+
dst: "/tmp"
72+
is_bind: true
73+
rw: true
74+
}
75+
76+
mount {
77+
src: "/dev/urandom"
78+
dst: "/dev/urandom"
79+
is_bind: true
80+
}
81+
82+
iface_no_lo: true
83+
84+
mount {
85+
src: "{BUILD}"
86+
dst: "{BUILD}"
87+
is_bind: true
88+
mandatory: false
89+
rw: true
90+
}
91+
mount {
92+
src: "{CARGO_HOME}"
93+
dst: "{CARGO_HOME}"
94+
is_bind: true
95+
# Readonly
96+
rw: false
97+
}
98+
99+
mount {
100+
src: "{BUILD}/registry"
101+
dst: "{CARGO_HOME}/registry"
102+
is_bind: true
103+
mandatory: true
104+
# Read-write
105+
rw: true
106+
}
107+
108+
mount {
109+
src: "{BUILD}/git"
110+
dst: "{CARGO_HOME}/git"
111+
is_bind: true
112+
mandatory: true
113+
# Read-write
114+
rw: true
115+
}
116+
117+
{DEV}

backend/windmill-worker/nsjail/run.rust.config.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,6 @@ mount {
104104
}
105105

106106
{SHARED_MOUNT}
107+
108+
{DEV}
109+

0 commit comments

Comments
 (0)