Repository navigation
Adam v0.2.0 #4
jarroddavis68
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Adam 0.2.0 -- embedding, libAdam, benchmarks and a faster compiler
Adam is a Pascal and Oberon inspired systems programming language that compiles straight to native x86_64 machine code with its own compiler, optimizer, linker and debug-info writer: no C toolchain, no transpiling, nothing else to install. The compiler is written in Adam and builds itself, and every self-build proves it: the compiler built by itself builds itself again, byte for byte the same, or nothing is installed.
0.2.0 targets Windows and Linux on x86_64, each building for the other, as 0.1.0 did. It adds Adam compiled at run time inside your own program, a library form of that for C and Pascal hosts, a benchmark suite against C, and a long list of speed and correctness work.
What's new since 0.1.0
Adam.Embedis an embedding host: it compilesmodule memmodules from text at run time, links them straight into memory against itself and calls them, on both targets. Build in the background and swap in at a point you choose, keep state across a hot reload (keep), override scripts from a mods folder, and share declarations both sides import (external mem).adam check <mod> --host <exe>checks a module against its host, and the debugger follows mem modules.libadam.aandadam.dll/libadam.sowithadam.handadam.pas, in the newbindings/folder with C and Pascal examples. Every dll and lib Adam builds now writes a Pascal unit beside its C header, and@exportunitexports an imported unit's C API as the library's own.adam benchtimes 14 kernels beside C twins at every optimize level on both targets, checks every checksum against C, writes JSON and a themed HTML5 report, and--checkfails a kernel that grew more than 10% against a baseline. See the Benchmarks page on the site.inlineroutines; closure calls and borrowed references without count traffic; a chain of string+built in one allocation; returned references moved, not copied; functions aligned to cache lines; a register allocator that keeps loop values out of the loop's back edge.res/acu.System.Machine(processor, OS, memory),System.MemMap(virtual memory, mapped and shared memory),System.DynamicLibrary(load a shared library at run time),System.TextTemplate(HTML, Markdown or text from JSON),System.Bench; 61 units in all.adam cimportwrites each C declaration's header comment as its///doc, and the raylib, Raven, SDL3, SDL3_mixer, mojoAL, JSON, XML, TOML, zlib, minizip, pl_mpeg and libc units are regenerated with them: hovering an imported routine shows its documentation.-g-- a release build writes its PDB too (Windows), so profilers name the code./proc, pipes) reads to its end;size(T)andyieldinside generics; arrays written through avarparameter on a background task; compiled units are the same bytes whichever program compiles them; building Adam from an unzipped release works.Highlights
adam build: SSA optimizer, x86_64 code generator, COFF and ELF object writers, a linker and a PDB writer, all part of Adam.x86_64-windows-gnuandx86_64-linux-gnu;-tpicks one, andadam build hello.adam -t x86_64-linux-gnu -ron Windows runs the Linux program through WSL2.debug,safe,fastandsmall(-opt)..acuunits, objects andextend, generics, closures, exceptions (hardware faults included),defer, generators, tasks (async/await),for parallel, locks and atomics,inline, and built-in unit tests (testblocks and asserts).external,clinkandcpplinkbind any C library with no headers in the build, andadam cimportturns C headers into a documented Adam binding unit.adamtestand 1,171 tests run from the unzipped release with nothing else:adamtest -allbuilds and runs every test.bin/res/examples/language/one folder per language topic, GUI demos, andembed_arena, a raylib game whose logic is an Adam script compiled while it runs.Quick start
Build and run a program:
Start a project:
Run the test suite and the benchmarks (from
bin):Release files
Adam-0.2.0-x86_64-windows.zip-- for Windows x64:adam.exe,adamtest.exeand the editor.Adam-0.2.0-x86_64-linux.zip-- for Linux x86_64: theadamandadamtestexecutables (the Linux editor and debugger come in a later release).Each zip unzips at the repository root and holds
bin/res/with both targets' runtime, standard library and libraries, the prebuilt units, the tests, the examples, the benchmark suite, the offline docs (bin/res/docs/index.html),bindings/and the compiler's source (src/).Known issue
Documentation: open
bin/res/docs/index.htmloffline, or read it at adamlang.org/docs; start with the tour.License: free and open source under the Mozilla Public License 2.0. The runtime and standard library code Adam builds into your programs carries an additional permission: see
RUNTIME-EXCEPTION.md.Requirements: Windows x64 or Linux x86_64. Running a Linux program from Windows (
-t x86_64-linux-gnu -r) needs WSL2.File Integrity
Release files are signed with minisign to verify their authenticity and integrity.
SHA-256:
Public key:
RWSLGfwSOWByrazkUwTzwlJ3rozKvaSnr3KT2aS/hSPDSLzUTPgj/m2XTo verify a downloaded file:
A successful verification confirms that the file was signed by the project and has not been modified since it was signed.
This discussion was created from the release Adam v0.2.0.
All reactions