This is an alpha release, the third pre-release on the road to v0.7.0.
Please read the getting started guide for flashing instructions.
Added
- Added
filename:dirname/1,filename:basename/1,2,filename:extension/1,filename:rootname/1,2andfilename:join/2 - Added
init:get_arguments/0 - Added
atomvm:posix_kill/2to send a signal to a process, typically one started withatomvm:subprocess/4 - Added Erlang distribution over serial (uart)
- Added WASM32 JIT backend for Emscripten platform
- Added
network:wifi_scan/0,1to ESP32 network driver to scan available APs when in sta or sta+ap mode. - Added support for
nif_start,executable_lineanddebug_lineopcodes - Added named variable debugging support in DWARF when modules are compiled with
beam_debug_info - Added more reset reasons and ensured
esp:reset_reason/0doesn't returnundefined - Added I2C, SPI and UART APIs to stm32 platform
- Added
Transfer-Encoding: chunkedresponse support toahttp_client, including HTTP trailers - Added
proc_lib:init_fail/2,3 - Added UART API to rp2 platform
- Added
"USB_SERIAL_JTAG"peripheral to the ESP32uartmodule on chips with a built-in
USB-Serial-JTAG controller (C3/C5/C6/C61/H2/H21/H4/P4/S3) - Added support for the
safeoption inerlang:binary_to_term/2 - Added support for process aliases:
erlang:alias/0,1,erlang:unalias/1,
erlang:monitor/3with the{alias, Mode}option,spawn_opt{monitor, MonitorOpts}and
sending to an alias reference - Added xtensa JIT backend for esp32 platform
- Added support for configuring pins and width for sdmmc on ESP32
- Added support for map comprehensions
- Added USB CDC port drivers for ESP32, RP2, and STM32 platforms
- Added a Linux
gpiodriver for the generic_unix port (inavm_unix) using sysfs - Added
console:print_err/1to write to standard error - Added support for
process_info/1andprocess_info/2with list argument - Added
erlang:term_to_binary/2,erlang:is_builtin/3anderlang:bitstring_to_list/1 - Added
lists:mapfoldr/3 - Added
emscripten:run_script_tracked/1andemscripten:get_tracked/2to hold handles to
JavaScript values from Erlang, tying the JavaScript value lifetime to the Erlang term lifetime.
The emscripten module object gainedtrackedObjectsMap,nextTrackedObjectKey()and the
onRunTrackedJs,onGetTrackedObjectsandonTrackedObjectDeletehooks, which embedders may
override to customize what tracking means - Added
string:to_integer/1 - Added
Esp.ADCElixir module with the low level ADC NIFs (init/0,deinit/1,
acquire/4,release_channel/1andsample/3), which were registered natively but had
no Elixir source - Added
LEDC.fade_stop/2,LEDC.set_duty_and_update/4,LEDC.set_fade_step_and_start/6,
LEDC.set_fade_time_and_start/5andGPIO.set_function/2, which were registered natively
but missing from the Elixir modules - Added a
supported_apibuild target that generatesfuncs.txtandinstructions.txt,
describing the functions and the BEAM instructions supported by the configured build - Added a
check-native-stubsbuild target, run in CI, that verifies every function
registered inbifs.gperfornifs.gperfhas a matching Erlang export - Added a
hex_packagebuild target that builds theatomvmHex package, published on
hex.pm by CI when a release is tagged, so that build tools can check a project against
the AtomVM release it targets
Changed
erlang:process_info/2now accepts only pids of local processes, as Erlang/OTP does:
calling it with a port now raisesbadarg(previous versions accepted any id-carrying
term, so it could be used to read port information; there is noerlang:port_info/2
in AtomVM yet to migrate such code to)- Updated network type db() to dbm() to reflect the actual representation of the type
- Use ES6 modules for emscripten port, using .mjs suffix
ahttp_clientnow returns{error, {parser, incomplete_response}}when a socket closes mid-response
(previously silently reportedclosed);ssl_closedmessages are also handledahttp_clientnow returns{error, {parser, {conflicting_content_length, V}}}when a response
carries differingContent-Lengthvalues (previously silently accepted the last one),
per RFC 9112 §6.3ahttp_clientnow emits adoneevent for responses withContent-Length: 0(previously
the parser stayed inbodystate forever, hanging passive callers and misflagging legitimate
close asincomplete_response)ahttp_clientnow discards bytes pastContent-Lengthand transitions todone(previously
emitted the excess as body data and stalled the parser when the socket delivered more than
the promised byte count)ahttp_clientnow caps parsed status, header and chunk-size lines at 16 KiB (?MAX_LINE_SIZE);
longer lines return{error, {parser, {line_too_long, Prefix}}}with the first 128 bytes of
the offending line. Callers whose upstream servers emit unusually large headers must account
for this limit- Replaced the
exavmlibProtocolmodule with a small runtime shim (onlyProtocol.__concat__/2),
saving ~31 KB of flash. ExAtomVM uses precompiled, unconsolidated protocols and continue to function normally at runtime. - Deprecated the C macro
REF_SIZE: useTERM_BOXED_REFERENCE_SHORT_SIZEfor references built
from ref ticks,TERM_BOXED_REFERENCE_PROCESS_SIZEfor process references (aliases), or
TERM_BOXED_REFERENCE_MAX_SIZEto fit any reference.REF_SIZEstill expands to the short
reference size, but now emits a compiler warning - On ESP32 platform, when starting wifi as a station (client), disable wifi power save so TCP servers are reachable
Removed
- Removed
ahttp_clientsupport for obsolete line folding (RFC 9112 §5.2); folded header and
trailer lines now return{error, {parser, deprecated_obs_fold}}, and the
header_continuation/trailer_header_continuationresponse events are no longer emitted
Fixed
- Fixed generic_unix and emscripten builds with
AVM_DISABLE_SMP=ONand task drivers enabled - Fixed
supervisorstarting a child from a specification carried in a message, letting any
process make a supervisor call an arbitrary function - Fixed
supervisorleaving children unrestarted when a message reached it during a
one_for_allrestart or before a failed restart was retried - Route
io:put_chars(standard_error, ...)andio:format(standard_error, ...)to stderr instead
of aliasing them to standard_io (diagnostics no longer pollute an escript's stdout) - Stop using deprecated
term_from_int32on STM32 platform - Stop using deprecated
term_from_int32on RP2 platform - Stop using deprecated
term_from_int32on ESP32 platform - Fixed improper cast of ESP32
event_dataforWIFI_EVENT_AP_STA(DIS)CONNECTEDevents - Fixed ESP32 SNTP synchronization events posting only a pointer-sized payload instead of the
fulltimeval, so{sntp_sync, {Sec, USec}}now includes both timestamp fields erlang:system_info(system_architecture)now reports normalizedarch-vendor-osstrings- Fixed
ahttp_clientcrash on non-numeric or negativeContent-Lengthvalues - Fixed
ahttp_clientcrash on headers with empty or all-whitespace values - Fixed a bug in
supervisorhandling of failing child - Fixed two bugs related to closing fds in
atomvm:subprocess/4 - Fixed
message_queue_len(as reported byerlang:process_info/2): unprocessed signals,
such as monitor or unlink requests, were counted as queued messages - Fixed a process hanging forever after catching an exception raised asynchronously by a
trapping BIF: the trap flag was left set, so the process parked at the next scheduling
point and never ran again - Fixed
erlang:localtime/1memory leak, use-after-free, and TZ restore bugs on newlib/picolibc - Fixed ESP32 I2C driver resource leaks, half-closed state, and close-during-transmission errors
- Fixed several underallocation issues that could trigger data corruption on
binary:replace,zlib:compressand bsd socket recv code. - Fixed a bug where
catchwould raise on regular atom results - Fixed ESP32 socket driver holding the global socket-list lock across blocking TCP connects, leaking the port on connect failure, losing concurrent
acceptwaiters, leakingnetbufon receive error paths, and a recycled-netconnrace between socket close and the event handler - Fixed generic_unix TCP server sockets performing an abortive close that could truncate replies awaiting ack
- Fixed a JIT crash (
EXC_BAD_ACCESS/SIGBUS) on Apple Silicon - Fixed the ESP32 event poller re-blocking after running a listener, which could delay a process
readied by a driver (e.g. an active-mode socket message) until the next event or timer tick - Fixed
term_from_resourcefailing to compile from C++ - Fixed a bug where negative or oversized segment sizes were not rejected in binary matching
- Fixed the
networkmdns configuration to read the documentedhostkey; the previously
required, undocumentedhostnamekey is still accepted - Fixed
term_is_uint32accepting big integers whose low 64 bits are within range on 32-bit
builds, which madeerlang:crc32/2,erlang:crc32_combine/3andcrypto:pbkdf2_hmac/5
silently truncate huge integer arguments instead of raisingbadarg - Fixed a bug where bigints were not normalized, yielding equality errors
- Fixed
esp_adc:sample/2,3answering a bare atom such astimeouton a read failure, where
every other ADC function and its own documentation answer{error, Reason} - Fixed Elixir
map.fieldraisingundefinstead ofKeyErrororBadMapErrorwhen the key is
missing or the term is not a map, and the deprecatedmap.field()form raisingundefalways,
by adding theelixir_erl_passruntime helpers that compiled Elixir code calls - Fixed
maps:from_keys/2(andsets:from_list/1, which is built on top of it) not
deduplicating structurally equal but separately-allocated boxed terms, such as tuples