Open zetanumbers opened 2 months ago
is there any definition from newlib the ESP-IDF version lacks.
Yes, even for ESP-IDF there were some definitions that I only found in libc
and not in ESP-IDF. The easy way to know if the definition is on ESP-IDF is searching for it at https://docs.esp-rs.org/esp-idf-svc/esp_idf_svc/sys/index.html.
Regarding running this code on armv7-sony-vita-newlibeabihf
, not sure how easy it could be, but maybe @ivmarkov can help there.
is there any definition from newlib the ESP-IDF version lacks.
Yes, even for ESP-IDF there were some definitions that I only found in
libc
and not in ESP-IDF. The easy way to know if the definition is on ESP-IDF is searching for it at https://docs.esp-rs.org/esp-idf-svc/esp_idf_svc/sys/index.html.Regarding running this code on
armv7-sony-vita-newlibeabihf
, not sure how easy it could be, but maybe @ivmarkov can help there.
What were these definitions? I would've expected esp-idf-sys
to be a strict superset of libc
, modulo stuff which is not supported by the ESP IDF, like processes and signals.
Regarding running this code on
armv7-sony-vita-newlibeabihf
, not sure how easy it could be, but maybe @ivmarkov can help there.
The all-Rust approach we took can be applied on Vita only if you have Rust equivalents to the libc
Rust types which are generated using the Rust bindgen utility. We already have these (bindgen generated) Rust types thanks to out ESP IDF "sys" crate. If you have an equivalent "sys" crate for the Vita platform, which generates bi dings for the newlib headers on Vita (and possibly for other C Vita APIs) then it should be no-brainer. Otherwise you have to do the bindgen heavy lifting yourself. Not that it is a rocket science, but that would take some time.
What were these definitions?
Here are some examples that were present in libc
but not in esp-idf-sys
. I can gather the full list if required
// newlib/espidf module
sockaddr_un
AF_UNIX
FIONBIO
// newlib module
rlim_t
lconv
statvfs
...
O_ACCMODE
...
SOL_TCP
CLOCK_REALTIME
CLOCK_MONOTONIC
CLOCK_BOOTTIME
SO_BINTIME
SO_NO_OFFLOAD
....
IFF_UP
IFF_BROADCAST
....
TCP_MAXSEG
....
Yes if you can get the full list, so that we can audit. Some/most items from the partial list are OK to be missing (i.e. no Unix Domain sockets on ESP IDF) some seem weird (IFF_UP / IFF_BROADCAST).
I think this is the full list, hopefully I didn't miss anything:
// newlib/espidf module
sockaddr_un
AF_UNIX
FIONBIO
// newlib module
rlim_t
lconv
statvfs
passwd
sem_t
Dl_info
utsname
cpu_set_t
pthread_rwlockattr_t
O_ACCMODE
RTLD_LAZY
FIOCLEX
FIONCLEX
SOL_TCP
CLOCK_REALTIME
CLOCK_MONOTONIC
CLOCK_BOOTTIME
SO_BINTIME
SO_NO_OFFLOAD
SO_NO_DDP
SO_REUSEPORT_LB
SO_LABEL
SO_PEERLABEL
SO_LISTENQLIMIT
SO_LISTENQLEN
SO_LISTENINCQLEN
SO_SETFIB
SO_USER_COOKIE
SO_PROTOCOL
SO_PROTOTYPE
SO_VENDOR
SO_TIMESTAMP
SO_NOSIGPIPE
SO_ACCEPTFILTER
IFF_UP
IFF_BROADCAST
IFF_DEBUG
IFF_LOOPBACK
IFF_POINTOPOINT
IFF_NOTRAILERS
IFF_RUNNING
IFF_NOARP
IFF_PROMISC
IFF_ALLMULTI
IFF_OACTIVE
IFF_SIMPLEX
IFF_LINK0
IFF_LINK1
IFF_LINK2
IFF_ALTPHYS
IFF_MULTICAST
TCP_MAXSEG
TCP_NOPUSH
TCP_NOOPT
NI_NOFQDN
NI_NUMERICHOST
NI_NAMEREQD
PRIO_PROCESS
PRIO_PGRP
PRIO_USER
I would like to run this code on the
armv7-sony-vita-newlibeabihf
target. I can see how it can be done, but I would need to know is there any definition from newlib the ESP-IDF version lacks, which I would need to add back for vita?I want to check and maybe correct the https://github.com/rust-lang/libc/pull/3920