v0.22.0
Support for Windows and continued improvements for acton test
! Internally the
biggest change is the removal of link time redirection of malloc, which opens up
for more flexible memory management.
Added
- Acton programs now run on Windows!
- It is now possible to compile Acton programs for Windows, both x86_64 and
aarch64, although since Acton itself (compiler etc) is not available on
Windows, only cross-compilation from MacOS or Linux is possible. - Use
acton --target aarch64-windows-gnu examples/helloworld.act
to produce
examples/helloworld.exe
which can be run on Windows - Acton applications compiled for Windows are single threaded
- termios related terminal settings, is not supported on Windows
- It is now possible to compile Acton programs for Windows, both x86_64 and
- Acton RTS now supports actor cleanup through GC finalization
- Define a
action def __cleanup__():
action on your actor and it will be run
when the actor is about to be garbage collected
- Define a
acton build
now builds dependencies indeps/
before building the main
projectacton test
now excludes the time spent in GC from test times- This is probably somewhat approximate and not super accurate, in particular
for tests with very short test durations
- This is probably somewhat approximate and not super accurate, in particular
acton test perf
is now expanded and support all kinds of tests (previously
only unit tests were supported)- some memory usage is printed alongside timing information
- GC is run explicitly during perf test to get better memory usage stats but
it also slows things down a bit, in particular for very short duration tests
acton test perf --record
can save a performance snapshot to disk- Subsequent invocations of
acton test perf
will back the data from disk and
display a comparison with percentage diff
- Subsequent invocations of
- AbE: testing documentation is much improved!
acton --only-build
performs only the low level build from .C source,
skipping compilation of .act files. This can be used if you want to modify the
C source by hand and still leverage the low level builder to perform the build.file.FS.cwd()
to get current working directoryfile.join_path()
to join path components- Link time redirection of malloc & friends is now removed. All malloc calls are
instead explicit, either directly toGC_MALLOC
or viaacton_malloc
which
is our own malloc function which is runtime reconfigurable. While there is no
usage of malloc directly from our code, it is now possible to do manual
memory management mixed with GC managed memory.- As before, module constants are placed in the regular heap, so that the GC
does not have to scan it. - Many string formatting functions have been reshaped since
asprintf
does an
implicit malloc, which we must either free or avoid. As a result, we now
copy less data around, which speeds things up.
- As before, module constants are placed in the regular heap, so that the GC
process.Process
now takes an optional timeout argument to stop the process- New
process.RunProcess
that waits for a process to exit and then reports to
a callback with the buffered output from stdout / stderr- This can provide a simpler interface than
process.Process
if you just want
to wait for the process to finish running before starting to parse its
output as you'll get a single invokation and the full output rather than
receive it piecemeal
- This can provide a simpler interface than
- Add
.unix_s()
.unix_ms()
.unix_us()
.unix_ns()
totime.Instant
- To get a Unix timestamp (seconds since 1970-01-01 00:00:00), as seconds,
milliseconds, microseconds or nanoseconds respectively
- To get a Unix timestamp (seconds since 1970-01-01 00:00:00), as seconds,
env.is_tty()
to check if stdout is a TTYacton.rts.start_gc_performance_measurement()
to start a GC perf measurementacton.rts.get_gc_time()
to get the GC timingsenv.is_tty()
to check if stdout is a TTYenv.set_stdin(canonical: bool, echo: bool)
to set stdin optionscanonical
is the default mode which is line buffered where the OS /
terminal offers line editing capabilities and we only receive the input ones
carriage return is hit- setting
env.set_stdin(canonical=False)
turns stdin into non-canonical mode
where each character as entered is immediately forwarded to the stdin
callback so we can react to it, great for interactive applications! echo
enables (the default) or disables echoing of characters
term
improvements:- More grey shades
term.clear
&&term.top
to clear and move cursor to top
http.Client.close()
to explicitly close a connection- Single threaded RTS mode, only used by Windows for now
Changed
- The work dir and environment arguments of
process.Process
have been moved to
the end as they are optional, making it possible to invoke with fewer args - Tests run by
acton test
are now compiled with--dev
and thus have C
asserts enabled, similarly the test.hs that drives the test in the Acton repo
now compile with--dev
to get C asserts acton test
now runs test for at least 50msacton test perf
now runs test for at least 1s- Rename
--only-act
to--skip-build
- Acton build cache now uses up to 15GB instead of 5GB
Removed
actonc
no longer supports--no-zigbuild
/--zigbuild
(it's now the
default/only choice). It hasn't been tested in quite some time now and the zig
build system works well enough that there is basically no reason to keep the
old system around.actonc
no longer accepts--cc
since we now always build using the zig
build system which implies the clang version that Zig ships.actonc
no longer supports explicit--stub
compilation, use--auto-stub
Fixed
key
argument inKeyError(key)
is now of typevalue
, notlist[None]
which it was previously incorrect inferred asfile.WriteFile.write()
now truncates file to avoid leftover tail of old
contenttime.Stopwatch().reset()
now works- Test crashes are now handled
- If the test program (e.g.
._test_foo
) crashes from an assert or similar,
the top test runner now captures this and reflects it in the output
- If the test program (e.g.
- Correct dependency path computation in builder
- Makefile now more idempotent to avoid building when nothing has changed
Testing / CI
- Test on MacOS 14 on Apple M1 / arm64 / aarch64
- Many tests are now repeatedly 100 times to give some idea of stability