> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/ar/almfahym-alasasyh/choose-your-core.md).

# اختر نواتك

يمكن لتطبيق ثنائي المسار أن يحتفظ بمنطقه الأساسي في جانب Solidity أو في جانب Solana الأصلي. إنه قرار تقديري — قيّم ما يهم تطبيقك.

معظم تطبيقات Rome ذات مسارين: حالة مشتركة واحدة، يصل إليها مستخدمو MetaMask (EVM) وPhantom (Solana) على حد سواء. يمكنك بناء واحد منها بصيغتين متقابلتين، يختلفان في **أيُّ جانب يحتفظ بالمنطق الأساسي.** لا توجد قاعدة صارمة تحدد أيهما تختار — إنها مسألة تقدير مرن وفقًا لما يهمّ *تطبيقك* تطبيقك: الشيفرة والأصول التي لديك بالفعل، وخبرة فريقك، ومستوى أمانك، والأدوات التي تفضّلها، والأداء، وكيف سيستخدمه كل جمهور.

## (أ) منطق أساسي بـSolidity؛ ومستخدمو Solana عبر مرسل اصطناعي

منطقك عبارة عن عقد Solidity. يُنفَّذ توقيع مستخدم Phantom على Solana كمعاملة EVM من هويته المشتقة من Rome (الـ `external_auth` PDA) — ولا يحتاجون أبدًا إلى مفتاح EVM. وغالبًا ما يكون هذا خيارًا مناسبًا عندما يكون لديك بالفعل عقد Solidity (خصوصًا إذا كان مُحصّنًا أو مُدقَّقًا)، أو عندما تريد أدوات EVM القياسية (Hardhat / Foundry / viem)، أو عندما يكون المنطق بسيطًا.

*اقرأ:* [aerarium](https://github.com/rome-protocol/aerarium) — سوق إقراض Compound v3 (منطق أساسي بـSolidity) يشترك فيه مستخدمو EVM وSolana.

## (ب) منطق أساسي لبرنامج Solana أصلي؛ ومستخدمو EVM عبر موجّه CPI خفيف

منطقك هو برنامج Solana أصلي؛ ويسمح موجّه Solidity خفيف لمستخدمي EVM بالوصول إليه عبر CPI. وغالبًا ما يكون هذا خيارًا مناسبًا عندما يكون لديك بالفعل برنامج Solana، أو عندما يكون تشغيل المنطق الأساسي محليًا مهمًا لما تبنيه.

*اقرأ:* [rome-dex](https://github.com/rome-protocol/rome-dex) — صانع سوق آلي (AMM) أصلي (منطق Solana) مع موجّه EVM، بحيث يتداول المساران في تجمع واحد.

## على سبيل المثال: الأداء

الأداء هو أحد الأمور التي *قد* ترجّح الاختيار — اعتبره مثالًا. يمكن أن يكون التنفيذ الأصلي على Solana أقل تكلفة بكثير من مترجم EVM للمنطق الثقيل: إحدى عمليات المبادلة التي قسناها كانت أرخص بنحو 6 مرات عند تنفيذها محليًا. إذا كان تطبيقك يحتوي على مسار ساخن كثيف الحوسبة، فقد يهمك هذا النوع من الفارق؛ أما إذا لم يكن كذلك، فغالبًا لن يحسم القرار. تعامل معه كأحد المدخلات العديدة، لا كقاعدة.

## أيًّا كان ما تختاره

اجعل المنطق الأساسي **محايدًا تجاه الجهة المخوّلة** — وتصرّف بناءً على أي جهة تخوِّل التوقيع، بحيث يمكن أن يكون المستدعي مفتاحًا عامًا على Solana *أو* PDA لمستخدم EVM — واجعل مجموعة الحسابات خفيفة ومتوافقة مع ALT حتى يبقى مسار EVM منخفض التكلفة، و **اختبر كلا المسارين.**

## ما التالي

* [استدعِ Solana من EVM](https://docs.rome.builders/ar/adlh-almtw-ryn/call-solana-from-evm.md) — آليات CPI للشكل (ب)، وأي استدعاء من Solidity إلى Solana.
* [ميزانية الحوسبة](https://docs.rome.builders/ar/almfahym-alasasyh/compute-budget.md) — المزيد عن تكلفة التنفيذ.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/ar/almfahym-alasasyh/choose-your-core.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
