Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

plan9: namespaces for gno

A Plan 9 namespace server. Every account owns a private mount table over 9P-shaped file trees: realms post trees into /srv, you bind them where you want them, and a name means what you bound it to.

/srv

name posted by since
dev gno.land/r/moul/x/plan9/dev/v0 272707

The demo namespace

mount #s /srv
bind -ac /usr/glenda/bin /bin
cd /usr/glenda

/bin is a union: the system /bin first, then /usr/glenda/bin, with -c so new files land in the second. Listing it shows both members because a Plan 9 union is a concatenation, so shadowing stays visible.

  • ns · ls / · ls /bin · cat /tmp/greeting · walk /bin/rc
  • any read-only command: rc?c=ls -l /srv

Your own namespace

gnokey maketx call -pkgpath gno.land/r/moul/x/plan9/ns/v0 \
  -func Exec -args 'bind -ac /srv/dev /dev; echo hi > /tmp/f'

Then browse it with ?u=<your address>. Reset throws it away.

Namespaces

  • demo

Design and analysis: moul/gno-contracts#136.

Not affiliated with Plan 9. Plan 9 from Bell Labs is the work of the Computing Science Research Center at Bell Labs; the name and the marks are theirs, and the copyright is held by the Plan 9 Foundation. This realm borrows the vocabulary and none of the code: it is an homage, asking what that ecosystem's spirit looks like on a chain.