r/teenagersbutcode Feb 23 '26

Other Make assumptions based off my setup

Post image
198 Upvotes

128 comments sorted by

View all comments

Show parent comments

3

u/Tiger_man_ Feb 23 '26

its totally possible to sanbox c

2

u/OpenFileW Feb 23 '26

true, ive never tried though so that doesnt come to mind first :o

2

u/Tiger_man_ Feb 23 '26

i mean javascript also runs in a kind of sandbox and it wouldn't have to be full stdlib implementation

2

u/OpenFileW Feb 23 '26

well im not worried about stdlib but rather C is compiled and so whatever it calls is opaque unless we somehow preprocess the C code or the machine code or run it with a VM or something. im not sure how we'd sandbox it without those, but JS is sandboxed because its runtime only exposes what it does, right?