2612 Commits
Author SHA1 Message Date
andrey 94084fb351 Merge branch 'master' into webasm
Переработка ветки под систему фиче-флагов master:
- CMake-секция PIP_WASM (платформа, аналог PICO/FREERTOS): принудительный
  OFF PIP_HAS_SOCKET/PROCESS/DYNLIB/SERIAL и PIP_BUILD_CONSOLE/USB/OPENCL/
  FFTW/LUA/MQTT_CLIENT/HTTP_SERVER/HTTP_CLIENT до pip_resolve_feature_flags();
  таблица зависимостей довыключает client_server/cloud/introspection
- Файлы, покрытые фиче-флагами master (piethernet/piserial/pican/pilibrary/
  piprocess): взята master-версия, EMSCRIPTEN-стубы webasm удалены как
  мёртвый код (нет флага — нет класса)
- Сохранены EMSCRIPTEN-гварды там, где флаги не покрывают поведение:
  pihidevice (компилируется под wasm), piinit (initSignals/initLocale/
  initUsername/initOSname/initHWInfo), pisysteminfo (instance/machineKey),
  pithread (gettid-фоллбэк), picout (EM_ASM console.log),
  pibase_macros (PIP_MIN_MSLEEP), pipiplatform.h (EMSCRIPTEN/ARCH_BITS)
- Исправлен AUTO-merge в PISystemInfo::machineKey() (семантический баг:
  пустой результат при PIP_HAS_FILESYSTEM=OFF)

Проверено: нативный ctest 364/364 (build-verify), wasm-сборка (build_wasm,
лишь libpip.a + libpip_io_utils.a + pcre2), node-смоук-тест PICout/PISystemInfo
2026-09-19 11:01:39 +03:00
peri4 031c3b9999 more 17 standard 2026-09-15 10:56:04 +03:00
peri4 04a588eb45 version 6.0.0
change CMAKE_CXX_STANDARD to 17
add PIByteArray(PIMemoryBlock)
PIJSON print functions now correctly handle top-level node, print name only for non-top-level
2026-09-15 10:53:21 +03:00
peri4 b745d5d867 add 418 code (1 april joke) 2026-09-11 20:17:33 +03:00
peri4 8e41461c08 version 6.0.0_beta
PIThread:
- remove old  V singleton V, migrate to modern STATIC_INITIALIZER and common singleton
- add PowerPolicy - now implemented only for Windows, if SetThreadInformation available, then use, else try to use SetThreadIdealProcessor. Mixed cores not supported for SetThreadIdealProcessor case.

PIThreadPoolLoop: add setPriority() and setPowerPolicy()
2026-09-08 15:40:44 +03:00
peri4 1b66ff527f PIInit - remove old V singleton V shit, migrate to modern STATIC_INITIALIZER, fix Windows locale
all PIP_HAS_*-derivated headers - #ifdef after basic includes
2026-09-06 21:42:26 +03:00
peri4 05ae5411f3 windows version pretty 2026-09-06 17:22:39 +03:00
andrey b1aed49797 Merge pull request 'Pico sdk fixes' (#218) from pico_sdk into master
Reviewed-on: #218
2026-09-06 13:22:29 +03:00
andrey a22b508952 Merge branch 'master' into pico_sdk 2026-09-06 13:21:00 +03:00
andrey 6f9885f0b7 remove duplicate INTROSPECTION option 2026-09-06 13:20:27 +03:00
peri4 3da94abb2a PIInit refactoring, iteration 2
add to PISystemInfo processorsCount<P|E> fields, now counts only for Windows
Introspection public API works without PIP_HAS_THREADS
2026-09-06 10:41:53 +03:00
peri4 7051e138e9 PIInit refactoring, first iteration 2026-09-06 09:09:45 +03:00
peri4 43e7c8de0d Merge pull request 'Pi Pico support' (#193) from pico_sdk into master
Reviewed-on: #193
2026-09-05 23:13:14 +03:00
peri4 b36e9a9bfb version 6.0.0_alpha
try to release with features
2026-09-05 23:12:57 +03:00
peri4 4df907ef10 CMake - add all flags to pip_defs.h
Introspection - revert *_p files, because they are external API for introspection, not internal
2026-09-05 23:09:38 +03:00
andrey 369e15ea5f cmake: make pip_feature_flag take DESCRIPTION and DEFAULT, describe all feature flags 2026-09-01 17:46:22 +03:00
andrey 00d92abf7d chore: stop tracking AGENTS.md (local-only, already in .gitignore) 2026-09-01 12:58:56 +03:00
andrey 0572e38325 fix: register std::function<void()> typename so state machine compiles in NO-RTTI debug builds 2026-08-31 22:07:40 +03:00
andrey 5bde1603cd test: add PIStateMachine test suite (states, transitions, guards, final/parallel states, timeouts, nested posts) 2026-08-31 21:47:29 +03:00
andrey fa7ff781fe refactor: use targeted includes (pibase_macros.h, piliterals_string.h) and guard <string> by PIP_HAS_RTTI 2026-08-31 19:12:38 +03:00
andrey b6b7a27dcc cmake: make PIP_HAS_DYNLIB depend on PIP_HAS_FILESYSTEM, drop redundant guards in piplugin 2026-08-31 19:02:48 +03:00
andrey 2f840c74e5 refactor: remove unused PIBinaryStream operators for PIMQTT message types
The operator<< / operator>> templates for MessageConst / MessageMutable
added in 4d8b7430 have no users in the tree (libs, tests, utils, main).
Drop them along with the pibinarystream.h include they required; the
binary-stream fallback static_assert in pibinarystream.h already gives a
clear compile error if external code ever streams an MQTT message.
2026-08-31 18:56:29 +03:00
andrey 09144acf4d cmake: simplify feature-flag dependency resolution
Replace scattered option() calls, PIP_HAS_DEPS_* variables, and while-loop
resolver with pip_feature_flag() function and pip_resolve_feature_flags()
macro. Dependencies are declared inline and resolved in a single pass.
2026-08-31 18:51:08 +03:00
andrey d16f4bdaf7 feat: decouple PISerial from PIP_HAS_THREADS, gate termios/stty code by PIP_HAS_TTY
- CMake: drop PIP_HAS_SERIAL -> PIP_HAS_THREADS dependency and the forced
  PIP_HAS_SERIAL=OFF for PICO_BOARD, so serial can be built on Pico
- piserial.cpp: guard termios/stty code (tcgetattr/tcsetattr/tcflush/tcdrain,
  TIOCSBRK/TIOCCBRK, TIOCMBIS/TIOCMBIC/TIOCMGET, termios members, sys/ioctl.h
  and termios.h includes) with PIP_HAS_TTY; O_NOCTTY replaced by
  PISERIAL_NOCTTY (0 on no-TTY targets)
- add missing #ifndef fallbacks for B110..B115200 used by convertSpeed()
  when termios.h is absent
- guard thread-only PIIODevice API calls (isThreadedRead/stopThreadedRead)
  with PIP_HAS_THREADS in closeDevice/readDevice
- gate the availableDevicesInfo() test loop with PIP_HAS_FILESYSTEM||WINDOWS
  (device enumeration is a filesystem feature)
- AGENTS.md: note that clang-format-18 is applied automatically on file edits
2026-08-31 18:27:09 +03:00
andrey 8e9ba0298e fix: guard RTTI/threads/filesystem dependent code for arbitrary flag combinations 2026-08-31 17:10:38 +03:00
andrey 14355ede0f Merge remote-tracking branch 'origin/master' into pico_sdk
# Conflicts:
#	libs/main/io_devices/pidir.cpp
#	libs/main/io_devices/pifile.cpp
#	libs/main/thread/pithread.cpp
2026-08-31 13:24:55 +03:00
andrey 5209dd5fd4 use KiB literals for default packet sizes 2026-08-31 13:01:37 +03:00
peri4 b1af66bee7 Merge pull request 'Support building with musl libc (Alpine Linux)' (#216) from alpine-musl-build into master
Reviewed-on: #216
2026-08-30 20:11:58 +03:00
andrey 446eea404f support building with musl libc (Alpine Linux)
- use LFS64 file/stat APIs only on glibc/Windows (absent in musl)
- use plain sched_priority outside glibc
- do not declare pow10(double) where the system provides C23 pow10() (musl)
- ICU is off by default: modern ICU (>= 75) needs C++17 for its headers,
  the project is built with C++11; enable explicitly with -DICU=ON
- fix latent crash: PIThread::setThreadName() read the thread handle from
  inside the new thread; the handle is not guaranteed to be visible before
  start (musl publishes it later), rename the calling thread via
  pthread_self() instead
2026-08-29 22:04:46 +00:00
andrey efede9e6bc small fix 2026-08-28 21:22:27 +03:00
andrey 4115d79e88 Merge branch 'master' into pico_sdk 2026-08-28 21:12:53 +03:00
andrey 47f9119afe Merge pull request 'Add GDB pretty-printers for basic types (PIString, PIVector, PIMap, PIByteArray, etc.)' (#213) from gdb_pretty_printers into master
Reviewed-on: #213
2026-08-27 20:11:00 +03:00
andrey 6418a835e7 update doc 2026-08-27 20:08:59 +03:00
andrey 49c95dbe72 add Qt Creator dumper for PIP types and PINetworkAddress GDB printer 2026-08-27 18:03:25 +03:00
andrey 37dbacc094 fix 2026-08-27 15:16:16 +03:00
peri4 2764df8591 adopt for host Windows 2026-08-27 13:34:31 +03:00
andrey 70ddd1e7fb revert example piiodevice 2026-08-27 12:30:54 +03:00
andrey ce7a6869ee update AGENTS.md 2026-08-27 12:30:41 +03:00
andrey 74390a9678 fix: restore clang-format off guard and platform include order in piethernet.cpp 2026-08-27 12:29:35 +03:00
peri4 cce1f6fa5c Merge pull request 'add PIIODevice::shutdown()' (#215) from master into gdb_pretty_printers
Reviewed-on: #215
2026-08-27 03:40:12 +03:00
peri4 59c7e99e50 add PIIODevice::shutdown() 2026-08-26 11:38:30 +03:00
andrey c2e6a9927c refactor: merge adjacent same-condition preprocessor blocks
Merge consecutive #ifdef PIP_HAS_FILESYSTEM / PIP_INTROSPECTION / PIP_CAN
blocks that had no code between them into a single guarded block.
2026-08-25 17:21:01 +03:00
andrey 331ef49991 refactor: simplify redundant PIP_HAS_* preprocessor guards
- drop INTROSPECTION conjunctions (CMake dep table already forces THREADS+SOCKET)
- remove whole-file guards in client_server/process tests (CMake only compiles them when flags are ON)
- normalize single-flag '#if defined(PIP_HAS_X)' to '#ifdef PIP_HAS_X'
2026-08-25 16:57:20 +03:00
andrey 69b22bf95a feat: complete PIP_HAS_* feature guards in code and auto-generate flag summary
Guard PIConnection, thread primitives, PICodeParser and other feature
code behind PIP_HAS_THREADS/PIP_HAS_FILESYSTEM. In CMake generate the
feature flags summary from the single PIP_HAS_FLAGS list (used by the
add_definitions loop as well), default ICU to OFF and make introspection
also require PIP_HAS_SOCKET. Build system/thread test suites only when
the corresponding feature flags are enabled.
2026-08-25 11:14:25 +03:00
andrey a8fc2911d7 refactor: declare PIP_HAS_* feature dependencies as a FindPIP-style table
Replace the ad-hoc if-blocks with a PIP_HAS_DEPS_<feature> dependency table
(analogous to __deps_* module dependencies in FindPIP.cmake) resolved to a
fixpoint. The table now also covers http_server (threads+socket) and fftw
(has_fft), and adds the hard client_server/cloud -> io_utils module
dependency. Restore client_server/cloud under the sodium_FOUND guard, put
-ftemplate-depth-32 back before the CMAKE_C_FLAGS copy, and fix the console
block indentation.
2026-08-24 21:59:33 +03:00
andrey 2605446573 refactor: rename __PIP_TYPENAME_DECLARE to PIP_REGISTER_TYPENAME, add PIP_DECLARE_TYPENAME macro
- Rename __PIP_TYPENAME_DECLARE to PIP_REGISTER_TYPENAME across all headers
- Add PIP_DECLARE_TYPENAME(name) macro for in-class type name declaration
- Replace all static const char * __pip_typename__() member functions with PIP_DECLARE_TYPENAME
2026-08-24 19:31:41 +03:00
andrey ef1fa8077a Add GDB pretty-printers for basic types (PIString, PIVector, PIMap, PIByteArray, etc.)
Python pretty-printer script (tools/gdb/pip_pp.py) for the GDB debugger:
- PIString (UTF-16, escapes, surrogate pairs), PIByteArray (hex), PIChar
- PIVector<T>, PIDeque<T>, PIStringList, PIMap<K,V>, PISet<T>, PIPair<K,V>
- PIVariant (type + serialized size)
- pointers: (PIString *) 0x... "hello"; long containers truncated
- manual: gdb source tools/gdb/pip_pp.py
- automatic: CMake install ships share/pip/gdb/pip_pp.py and the
  libpip.so-gdb.py auto-load stub next to the library (shared builds)
- verification: tools/gdb/test/test_pp.sh <build-dir>
- docs: doc/pages/debugging.md
2026-08-23 20:24:34 +03:00
andrey c1b8e97311 Merge branch 'master' into pico_sdk 2026-08-23 17:19:34 +03:00
andrey d323ebae88 fix: register type names inside feature guards and shrink embedded I/O buffers
- move __PIP_TYPENAME_DECLARE() calls inside PIP_HAS_* guards so -fno-rtti
  builds compile with arbitrary reduced flag combinations
- guard PISerial declaration by PIP_HAS_SERIAL like other feature-gated classes
- reduce threaded read buffers to 1 KiB on embedded targets (PIIODevice,
  PIPacketExtractor, PIEthernet)
2026-08-23 09:25:32 +03:00
andrey 86a1084ec1 feat: enforce no-RTTI type name registration with static_assert 2026-08-23 08:20:51 +03:00