> 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).

# اختر نواتك

معظم تطبيقات 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 عند التعامل مع منطق ثقيل: صفقة swap واحدة قسناها كانت أرخص بنحو 6× عند التنفيذ الأصلي. إذا كان تطبيقك يحتوي على مسار ساخن كثيف الحوسبة، فقد يهمك هذا الفرق؛ وإذا لم يكن كذلك، فغالبًا لن يحسم القرار. اعتبره عاملًا واحدًا من بين عوامل كثيرة، لا قاعدة.

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

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

## ما التالي

* [استدعِ Solana من EVM](/ar/adlh-almtwryn/call-solana-from-evm.md) — آليات CPI للشكل (ب)، وأي استدعاء من Solidity إلى Solana.
* [ميزانية الحوسبة](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
