The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Dan Cross <crossd@gmail.com>
To: steve jenkin <sjenkin@canb.auug.org.au>
Cc: TUHS <tuhs@tuhs.org>, Warren Toomey <wkt@tuhs.org>,
	Liam Proven <lproven@gmail.com>
Subject: [TUHS] Re: Help with a Unix-ish project?
Date: Mon, 7 Aug 2023 09:26:33 -0400	[thread overview]
Message-ID: <CAEoi9W4KAjgR-Ak=67v_0dyG4UBvND9K7TC5B+ZXj7qL8j9e4A@mail.gmail.com> (raw)
In-Reply-To: <944EF3AD-8BB2-4B89-84A8-B759AB1C2790@canb.auug.org.au>

On Mon, Aug 7, 2023 at 1:30 AM steve jenkin <sjenkin@canb.auug.org.au> wrote:
> six years later…
>
> A note for the list:
>
> Warren (in. IMHO, a stroke of genius) changed the Repo from xv6-minix to xv6-freebsd.
>
>         <https://github.com/DoctorWkt/xv6-freebsd>

Cool.

xv6 came up again last week with a Hacker News posted, followed by an
article in the Register, about another xv6 clone written in Rust:
octox (https://www.theregister.com/2023/07/28/octox_v6_unix_in_rust/).
Octox bills itself as being written entirely in Rust, including the
userspace utilities.

In the Register article, author Liam Proven (who I believe is on this
list, Cc'ed here) mentioned my own rxv64, but seems to have missed
part of the point when talking about language statistics (rxv64 left
much of the userspace code written in C, except for the parts of the C
library I wrote, which are Rust...I do provide header files, though).
The point, of course, is that the implementation language used by the
kernel need not be the same as that used by userspace code; the
interface is instead through a contract with the kernel. What better
way to demonstrate this than write some of the userspace code in a
language that isn't Rust? In this case, the utilities were already
more or less written in C. Bakul pointed this out on the Hacker News
story about octox, but it didn't make it to the Register article and
of course was largely missed by the crowd on the Orange Site. Octox
looks like it would be pretty hard to use from a language other than
Rust, honestly; at least, one would likely have to provide a wrapper
library in another language (it appears that all of the names in the
octox userspace library are mangled).

And of course, octox is not 100% Rust, as the Register article
claimed; it has some assembly language bits, but those are hidden
inside of Rust source files (e.g.,
https://github.com/o8vm/octox/blob/main/src/kernel/swtch.rs), and it
generates system call stubs at build time that expand to inline
`ecall` instructions (octox target RISC-V, whereas rxv64 targets
x86_64).

I've avoided commenting publicly on the octox code, but I will say
that it has a much better README file than rxv64!

        - Dan C.

      reply	other threads:[~2023-08-07 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-07  5:30 steve jenkin
2023-08-07 13:26 ` Dan Cross [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEoi9W4KAjgR-Ak=67v_0dyG4UBvND9K7TC5B+ZXj7qL8j9e4A@mail.gmail.com' \
    --to=crossd@gmail.com \
    --cc=lproven@gmail.com \
    --cc=sjenkin@canb.auug.org.au \
    --cc=tuhs@tuhs.org \
    --cc=wkt@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).