You are not logged in.
Hi atm we are using claude a lot to build our Programs. Today i was thinking about the IDEA to ask claude to think about using m2 Client in our mobile Apps.
But first i like to ask if there is any progress going on here.
Last edited by itSDS (2026-09-15 12:28:17)
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
ATM i build it by myself i make pr if its ready
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Design would be not to make full compatibility of mORMot 2 units to all Delphi platforms, but a cross-platform simple minimal set of JSON + HTTP requests as in mORMot 1.
I guess it should eventually support
- all Delphi targets
- all FPC targets, including pas2js
- https://www.tmssoftware.com/site/tmswebcore.asp
- why not have the most simple pascal syntax compatible even with something like https://github.com/graemeg/blaise ?
- drop SmartMobileStudio support of mORMot 1 (replace with pas2js)
For a minimal HTTP/HTTPS client with basic JSON.
And eventually WebSockets (at least with pas2js and the native JS websockets API in browser).
Performance is not the main goal here, but compatibility.
We have already source code generation via Mustache templates in mormot 2.
Offline
ATM i build it by myself i make pr if its ready
Share!! ![]()
a quick note about a related project: PWeb (or mtron, name isn't decided yet) - github.com/flydev-fr/pweb
it is a desktop runtime for FPC/Lazarus (delphi soon), in the spirit of Electron or Tauri: mormot2 plus the OS WebView (WebView2, WebKitGTK, WKWebView), with a JS, React or pas2js frontend. There is no HTTP between the UI and Pascal. The UI calls regular mORMot 2 interface-based services in-process, through TRestServer.Uri(), with no socket and no port.
If a pas2js implementation would help your work, feel free to look at:
sdk/pas2js - pweb.native.pas: a promise-based Service.Method call with named JSON arguments and typed errors, plus its test suite
examples/05-pas2js - a complete pas2js frontend calling a mormot service
tools/templates/pas2js - the project template
v := await(JSValue, PWebInvoke('CalculatorService.Add', New(['a', 20, 'b', 22])));the transport there is the WebView bridge rather than HTTP, but the call shape is transport-agnostic. It might fit behind a Mustache-generated client.
About mobile: Android and iOS are planned. The first desktop release (Windows, Linux, macOS) should be out very soon, and the mobile targets come next (android_webview, JAVA layer are already set up).
Offline
I made 8 PR after testing m2 Client with Rad Studio 13.1 under FMX and FGX Platform: iOS / iOSSimulator / Android atm i can use m2 without SynCrossPlatform
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Waooo... native Delphi 13.1 support for those platforms are indeed much better... especially your asm stubs for client-side interface stub generation.![]()
I did not know about FGX it is impressive.
Too bad it does not support Lazarus/FPC.
I have just one question about a conditional use.
Thanks a lot!
Offline
Thank you too
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Hi,
inspired by the recent rework of itSDS and AB, and by the fact that we had the same problem until now — being stuck with a patched mORMot1 version with ORM support for FMX/Android — I decided to give mORMot2 another try with FMX Android64/ARMv8 and Delphi 13.1.
I put the complete test suite into an FMX mORMot2 test runner project.
Initially, around 50 tests failed...
With "some" AI help, I now get:
Generated with: Delphi 13.1 Florence 64 bit Android compiler
Time elapsed for all tests: 3m32
Performed 22 Sep 2026, 21:00:04 by unknown on localhost
Total assertions failed for all test suits: 0 / 198,452,444
! All tests passed successfully.iOS still needs to be tested, but now we can also use the full power of mORMot2 for our FMX applications. ![]()
I'm very happy to see how platform- and cross-compiler-friendly mORMot has become. It's great to be able to use the same codebase across so many different targets and compilers.
Should I make a PR?
The main problems were:
SQLite support — Fixed by statically linking/including the FireDAC SQLite library in the project. I chose this approach because I know that FireDAC supports local SQLite on Android. I don't know whether this could be a problem or whether there are better solutions. However, if you want to compile the FMX project, you need Delphi anyway, so FireDAC is also available. Some fixes for x64 and WAL were needed as well.
OpenSSL — Since OpenSSL is no longer included with Android > 6, we need either dynamically linked libraries or compatible statically linked ones. I generated the required
libcrypto-android64.aand
libssl-android64.alibraries and made some patches to
mormot.lib.openssl11.pas.
A small warning: the crypto test suite takes some time on my phone — around 1.5 minutes. Most of that is spent on the last test in the catalog (
x509-rs...).
The remaining issues were Android-specific, mainly related to multithreaded processing.
The test suite now runs without failures on:
[]Delphi 7 — Win32
[]Delphi 13.1 — Win32
[]Delphi 13.1 — Win64
[]FMX — Android
FMX — Win64
With FPC, I still get errors on both Linux and Windows:
SOA callback on server side: #4
...
SOA callback on server side: #NCould this be an FPC-related problem in the current master?
Offline
I guess we should be able to prepare the upcoming mORMot 2.5 release to include all needed static libraries for Delphi cross-platform too...
SQLite3 3.53.4 and perhaps even OpenSSL 4 - which has not been tested with static linking since a lot of time. But of course a pure TLS 1.3 layer in mORMot is on its way, but not for mORMot 2.5... ![]()
About threading issues I guess this is because there is no "main thread" on Android, right?
No problem with FPC on my side, perhaps you did not get the good version: use 3.2 fixes branches.
Offline
Hi,
@ab — yes, the issue with the "main thread" is because the tests are running in a worker thread. Otherwise, Android will warn that the app is not responding.
I've created a draft PR and also added my test project and some helper scripts to compile and run the test suite on a physical Android device or in the Android Studio emulator. I used a Pixel 9 for the emulator, and all tests pass there as well.
Feel free to merge or adapt any of this for the master branch.
@ab — should I mark the PR as "Ready for review", or should I leave it as a draft for now?
Of course, it would be great to have OpenSSL 3+ instead of OpenSSL 1.1w, as well as official mORMot SQLite libraries.
Offline