Stream: show and tell

Topic: restricted - simple cli platform!


view this post on Zulip removewingman (Aug 29 2026 at 13:09):

I am happy to announce the first release of a new simple cli platform, written in zig: restricted.

I will add feature as they are needed, expect changes and breaking in the API.

If u want to give it a try, hello world:

app [main!] {
    pf: platform "https://codeberg.org/removewingman/restricted-roc/releases/download/v0.1.0/B6GgBwhkmXLnV81UFDANEnwYWm2JrJwX3nRirR4Pk7AR.tar.zst",
}

import pf.Stdout

main! = |_args| {
    Stdout.println!("Hello World!")?
    Ok({})
}

or restrict:

app [main!] {
    pf: platform "https://codeberg.org/removewingman/restricted-roc/releases/download/v0.1.0/B6GgBwhkmXLnV81UFDANEnwYWm2JrJwX3nRirR4Pk7AR.tar.zst",
}

import pf.Restricted
import pf.Stdin
import pf.Stdout

main! = |_args| {
    Restricted.restrict!(
        [StdinStdoutStderrAndBasicFunctionality],
        [WriteToFilesystem],
        [
            {
                path: "xdd.txt",
                permissions: [Read, Write],
            },
        ],
    )?
    for line in Stdin.lines!()? {
        Stdout.print!("${line}\n")
    }
    Ok({})
}

Last updated: Sep 03 2026 at 15:16 UTC