Commit Graph
106 Commits
Author SHA1 Message Date
Moritz Angermann d28b2c0b94 Guard Windows RTS DLL search path conversion failures
Resolve relative paths once, retain successful namespace conversion, and use the resolved absolute path when conversion fails. Preserve the DLL directory cookie and Win32 errors across cleanup.

Apply only to Linux-built Win64 ghc914-sh v2 target RTS packages. Add a real-module scope check and native caller boundary regression; Windows runtime qualification remains separate.
2026-10-17 12:53:26 +09:00
Moritz Angermann ca0deb7050 Declare bitvec's Clang runtime on Intel Darwin 2026-10-17 11:32:27 +09:00
Moritz Angermann 03b83dd4df Handle singleton COMDAT functions in i386 musl RTS 2026-10-17 09:55:24 +09:00
Moritz Angermann 8c51745233 Keep patched Android crypton as a dependency-only goal
Disable only its newly promoted local tests and benchmarks before planning. Preserve the original library-only dependency scope, package bounds and flags while retaining the pthread metadata patch.
2026-10-17 08:32:28 +09:00
Moritz Angermann 4051b8f71f Fix Android pthread metadata before mobile shared linking
Patch crypton and direct-sqlcipher before planning: Bionic supplies pthread in libc and the NDK has no separate libpthread. Preserve compiler threading flags and the shared-link adapter.

Check Android-only source selection and allow the existing Android CI group to be dispatched independently for final-link validation.
2026-10-17 08:20:19 +09:00
Moritz Angermann c464566763 fix(nix): plan Windows x509 from its patched source
The v2 builder restores the original Cabal description override after source patching and also publishes that metadata into its index. Add the already selected 1.6.8 source as a prepatched local package so crypt32 reaches planning and source packaging. Apply the package patch once.

The actual native source producer changes only the Cabal file. Independent project capture retains Composition and byte-identical non-Windows project text. Production Windows planning, packaging, and final linking remain CI checks.
2026-10-17 05:06:13 +09:00
Moritz Angermann 11b7f33921 Seed SplitMix on Android below API 28
Use Bionic arc4random_buf for the older Android API route and retain the existing getentropy initializer from API 28. Register the real function address in the ARM32 interpreter so loaded SplitMix objects can resolve it.

Both ABI controls verify API26 compilation and linking against the actual NDK headers and providers, and API35 object equality. Final source checks use native LLVM21; exact final NDK18 and production package-tar validation remain for CI after local VM startup failures.
2026-10-17 04:03:38 +09:00
Moritz Angermann ad69b2b1a6 fix(nix): keep Intel Darwin info tables with their entry code
Mark x86 Mach-O info entries as alternate entries in both GHC stages, so LLD preserves tables-next-to-code. Add a production compiler object/link regression to the existing Intel CI job.
2026-10-17 03:32:41 +09:00
Moritz Angermann 89ffaea1be Allow musl cross interpreters to load C dependencies
Keep static Haskell libraries and fully static application outputs while planning ghc914-sh iserv projects with a dynamic musl C loader. Scope the policy to Linux-built musl Cabal v2 interpreters and check that scope in static Linux CI.

Normal and profiled target plans preserve all unit IDs, source records and Haskell ways; only the iserv executable-static flag changes. The shared V2 project skeleton changes auxiliary derivation hashes. A small i686 musl probe reproduces static dlopen failure and verifies the dynamic loader under QEMU; full interpreter TH validation remains for canonical CI.
2026-10-17 02:17:58 +09:00
Moritz Angermann 815d8434c3 Fix rebound negation of the Windows invalid handle constant 2026-10-17 02:05:28 +09:00
Moritz Angermann 75cb52df6a Share the mobile export manifest with desktop build guards 2026-10-17 00:51:06 +09:00
Moritz Angermann 00afd113ad build: fix native GHC ELF section alignment 2026-10-16 22:51:54 +09:00
Moritz Angermann 2951153b49 build: cast Windows invalid handle to pointer-sized integer 2026-10-16 22:49:15 +09:00
Moritz Angermann eabd7d7f3b build: declare static crypto libraries for musl packages 2026-10-16 22:27:44 +09:00
Moritz Angermann 17554a9d17 Declare Composition wired dependency for GHC 9.14 cross builds 2026-10-16 21:12:32 +09:00
Moritz Angermann 3e53def456 build: correct Windows crypton-x509-system patch selection 2026-10-16 19:58:41 +09:00
Moritz Angermann 748becda3e Enable ARM32 Android Template Haskell on emulated Linux builders
Scope the scheduling opt-out to the patched QEMU versions, patch the interpreter source before planning, and expose the real static Bionic and GNU iconv symbols. Use the RTS package dependency for Android libffi.

The production interpreter reaches Haskell main on Rosetta and native ARM64 QEMU. Normal target TH, the ARM32 shared export, a C caller returning 42, and upstream annotations pass. Profiling execution is not yet validated.
2026-10-16 13:22:52 +09:00
Moritz Angermann ef3a3b0b78 Provide static iconv for Android GHC boot libraries
Apply the API 26 dependency before planning every ghc914-sh Android project, including the auxiliary iserv projects and evalWith variants. Preserve the GNU headers and library paths in the plan and ghc-internal registration, and compile the static iconv archives with PIC for libsimplex.so.

Validated Nix parsing, duplicate module handling, the actual ARMv7 iserv plan arguments, and a real static/PIC libiconv build. The focused ghc-internal build remains pending.
2026-10-15 22:24:36 +09:00
Moritz Angermann e1d2f1ebca Fix Android ARM32 QEMU personality on hosts without AArch32 EL0 2026-10-15 21:57:10 +09:00
Moritz Angermann 31b91a1cdc Apply platform patches before planning source repository packages 2026-10-15 21:57:10 +09:00
Moritz Angermann b0eab49f34 Fix hsc2hs option handling in Darwin archive builds
Cabal 3.17 deduplicates flattened compiler and linker argument lists,
which drops the second -framework from Security/CoreFoundation links.
Remove the two token-level deduplications while retaining framework
search-directory deduplication and registered framework metadata.

Patch the Cabal library in haskell.nix's v2 build tool only for Darwin
archive projects. Preserve the tool's existing patches and evalWith
variants, and leave native CLI and Linux/Android build tools unchanged.
2026-10-15 21:01:47 +09:00
Moritz Angermann c72da15836 Export the iOS C library instruction baseline through structured env 2026-10-15 19:28:56 +09:00
Moritz Angermann 595f6c798e Reuse the cached native compiler in cross interpreter projects 2026-10-15 19:16:09 +09:00
Moritz Angermann 8854f6ae93 nix: construct native package sets for ARM64 Linux 2026-10-15 19:09:44 +09:00
Moritz Angermann 9198b0d0b0 Preserve mobile runtime settings and the ARM instruction baseline 2026-10-15 18:37:30 +09:00
Moritz Angermann 71beade0fa nix: exclude generated directory frontend link from Haskell sources 2026-10-15 18:29:02 +09:00
Moritz Angermann 251f342313 Scope compiler selection to the cached Hydra build context 2026-10-15 18:03:46 +09:00
Moritz Angermann 031dcaeeac Keep Android SDK permission scoped to its package imports 2026-10-15 17:52:26 +09:00
Moritz Angermann 52b9350bc8 Include the NDK composition SDK tools in Android evaluation 2026-10-15 17:50:10 +09:00
Moritz Angermann ea8f7c5ff2 Apply the BLST symbol declaration fix to Darwin builds 2026-10-15 17:45:13 +09:00
Moritz Angermann a4a3aacf38 Retain the current mobile C entry points when linking bundles 2026-10-15 17:42:28 +09:00
Moritz Angermann 7e7665cb79 Allow the prebuilt NDK within the Android package sets 2026-10-15 17:39:07 +09:00
Moritz Angermann f9530b0a5c Share the Cabal v2 mobile packaging adapter with Nix probes 2026-10-15 17:38:10 +09:00
Moritz Angermann d8c9f932e6 Relink and package mobile libraries from Cabal v2 slices 2026-10-15 17:28:47 +09:00
Moritz Angermann a14b239878 Plan platform package flags before building Nix slices 2026-10-15 17:08:09 +09:00
Moritz Angermann da3fbbc902 build: provide Darwin iconv when planning stable GHC projects 2026-10-15 16:29:15 +09:00
Moritz Angermann b2d18ae34b build: select SQLCipher encryption providers for every target 2026-10-15 16:28:02 +09:00
Moritz Angermann 4e7c91dadc build: pin stable GHC 9.14 for every Nix target 2026-10-15 15:54:50 +09:00
sh c8f20bcc91 core, libs: configurable queue size, library fixes (#7542)
* core: add chat_migrate_init_queue FFI export

* bots: fix BadgeServiceErrorCode API type

* nodejs: pass required command fields

* nodejs: fix migration error types

* nodejs: install libsimplex from SIMPLEX_LIBS_DIR

* nodejs: add queue size option

* nodejs: regenerate docs

* python: add queue size option

* bots: pass incognito in APIConnect

* nodejs: accept documented success responses

* python: accept documented success responses

* nodejs: dispatch each bot message once

* nodejs: fix startChat events loop lifecycle

* nodejs, python: parse multi-line bot commands

* nodejs: fix file buffer handling in addon

* nodejs: keep events loop when chat stop fails

* python: fix send_and_wait race, load lib off loop

* python: make queue size export optional

* nodejs: receive events on a dedicated thread

* nodejs: release haskell thread after receive

* python: receive on a dedicated thread per chat

* python: test receive shutdown order

* nodejs: one receive thread per chat controller

* nodejs: harden receiver shutdown and tests

* nodejs: stop chat before closing store

* python: stop chat before closing store

* nodejs, python: harden close regression and retry

* python: free results with ucrt on windows

* nodejs: enable c++ exceptions on mac and windows
2026-09-19 12:18:46 +01:00
spaced4ndy 6a7eae2751 ui: redeem code (#7482) 2026-09-15 14:23:13 +00:00
ad23da63d0 core: supporter badges using anonymous BBS credentials (#7040)
* core: supporter badges using anonymous BBS credentials

* badges in profiles

* badge in profiles

* process badges

* update simplexmq

* update simplexmq

* change types

* fix migration

* migration

* update simplexmq

* fix bot API, schema

* fix postgresql build

* refactor

* postgresql schema

* correctly set badges in all cases

* badges ffi

* plan, bot types

* FFI

* FFI: export badge symbols

* add extra field

* refactor badge types to GADT

* configurable badge key

* add badge to profile, test

* ui: badge images

* generate badge key and sign badge

* badge sign in CLI

* fix commands, ui

* rename badges

* Binary

* image size, migration

* update badge images, add public key

* send badges in more cases

* update UI, tests

* bot types, schema

* postgres schema

* tone down badges

* revert formula

* refactor badges

* smaller badges

* badge position

* better badge position

* simpler

* position

* move position

* update simplexmq

* show badge after name

* badge layout

* fix badge

* debug badge height

* shift badge

* fix badge in member name

* bigger badge

* badge layout

* differentiate badge colors

* more avatars for the user's profiles

* refactor

* remove color filter

* alerts

* multiple keys, old expired

* use new BBS api

* update badge keys, bot api

* presentation header

* simplify

* parser

* update iOS images

* update public keys

* query plans

* update simplexmq

* refactor badge types

* simplexmq

* bot api types

* update simplexmq - commoncrypto flag

* update simplexmq

* pass commoncrypto flag to simplexmq in nix iOS build

* ios ui

* update core library, fixes

* badge layout

* badge size

* badge gap

* remove extensions

* simplify

* share badge in more events, reverify badge if verification failed

* larger files with badges

* allow sending larger files

* simpler

* update simplexmq

* better decoder for badge keys

* update simplexmq

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
Co-authored-by: shum <github.shum@liber.li>
2026-06-15 22:25:08 +01:00
sh 577b30e72f nix: strip ios library (#6503)
* strip ios like in android

* remove strip-unneeded in mac

* strip only simplex-chat libs

* flake.nix: strip only local symbols in MacOS library

* flake.nix: make libs writable

* flake.nix: better strip placement

* reduce framework size by exporting only public API symbols
2026-04-13 14:40:27 +01:00
shandEvgeny 267e680698 nix: make android library reproducible (#6486)
* nix: make android aarch64 library reproducible

* src/Operators: embed PRIVACY.md without full paths

* nix: make android library reproducible

* Update src/Simplex/Chat/Operators.hs

Co-authored-by: Evgeny <evgeny@poberezkin.com>

* nix: remove unnecessary flags and apply changes to armv7a

* nix: strip libraries from debug symbols

* nix: strip before timestamp normalization

* nix: set epoch to 1764547200

---------

Co-authored-by: Evgeny <evgeny@poberezkin.com>
2025-12-10 09:50:26 +00:00
shandEvgeny 52661e8a74 nix: enable 16 KB page sizes (#6357)
* nix: enable 16 KB page sizes

* remove 16kb page from armv7a

---------

Co-authored-by: Evgeny <evgeny@poberezkin.com>
2025-10-24 16:05:24 +01:00
Evgeny ef60ceea12 core, ui: markdown for hyperlinks, warn on unsanitized links, option to sanitize sent links (#6160)
* core: markdown for "hidden" links

* update, test

* api docs

* chatParseUri FFI function

* ios: hyperlinks, offer to open sanitized links, an option to send sanitized links (enabled by default)

* update markdown

* android, desktop: ditto

* ios: export localizations

* core: rename constructor, change Maybe semantics for web links

* rename
2025-08-09 10:52:35 +01:00
Evgeny 88547ab704 core: use longer timeouts for background network requests, support retries with increased timeouts (#6043)
* core: use longer timeouts for background network requests, support retries with increased timeouts

* ios: update types

* ios: allow user retry actions with failed network requests

* build: add exporting API functions with retry

* android, desktop: update types and C APIs

* android, desktop: alert to retry action on network error

* simplexmq
2025-07-07 11:01:03 +01:00
Evgeny b8e2e71a60 core: exclude CLI modules from client library (#5758)
* core: exclude CLI modules from client library

* client_library flag in nix builds

* use client_library in builds, update iOS library
2025-03-16 19:30:31 +00:00
Alexander BondarenkoandEvgeny Poberezkin 165143a111 Use simplexmq with client_library flag (#5133)
* Use simplexmq with client_library flag

* fix server config for mq master

* simplexmq

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
2024-11-02 17:51:11 +00:00
Evgeny Poberezkin e343dd017b core: fix nix build for iOS build with tagged JSON (e.g., Flutter apps) (#4484) 2024-07-22 19:35:36 +01:00
Evgeny Poberezkin c8c81a840b core: revert build to use two branches (#4052)
* Revert "scripts: ghc version update (#4010)"

This reverts commit 35b7f2cb1c.

* Revert "Force include hs_init_with_rtsopts (#4028)"

This reverts commit 76a33a3743.

* Revert "core: fix nix config (#4003)"

This reverts commit f8e6a78a3b.

* Revert "ci: build armv7a with 8.10.7 in the main branches (master, stable) (#3733)"

This reverts commit 0d7a32877f.
2024-04-19 21:17:22 +01:00