Freestanding ATS

78 views
Skip to first unread message

Elronnd _

unread,
Oct 2, 2020, 9:10:12 PM10/2/20
to ats-lang-users
I'm trying to use ATS for OS development.  This means: no dependence on any feature of the host environment; nothing from libc.

It looks like the parts of the prelude that implement basic types and language features are the same as the parts that interface with the host libc (for e.g. exit, malloc, etc.).  Is there something I'm missing?  If not, is there any chance official, integrated support can be added for a freestanding mode?  Happy to contribute on that count, FWIW; just want to gauge interest.

Elronnd _

unread,
Oct 3, 2020, 3:42:48 AM10/3/20
to ats-lang-users
I was able to get a basic kernel running; see https://github.com/moon-chilled/ats-freestanding.

Probably silently breaks some code and isn't optimal, but it's a start.

Hongwei Xi

unread,
Oct 3, 2020, 4:01:23 PM10/3/20
to ats-lan...@googlegroups.com
In the past, I did use ATS2 to experiment with a kernel implementation:


Basically, you can just use some compile-time flags to get rid of various includes in the generated
C code. The following Makefile should be telling:


As for ATS3, I plan to support a scripting language for this kind of configuration. Will do this very soon.


On Fri, Oct 2, 2020 at 9:10 PM Elronnd _ <elr...@elronnd.net> wrote:
I'm trying to use ATS for OS development.  This means: no dependence on any feature of the host environment; nothing from libc.

It looks like the parts of the prelude that implement basic types and language features are the same as the parts that interface with the host libc (for e.g. exit, malloc, etc.).  Is there something I'm missing?  If not, is there any chance official, integrated support can be added for a freestanding mode?  Happy to contribute on that count, FWIW; just want to gauge interest.

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/9bf84c7c-c99d-4c72-8cca-392e41106576o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages