mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 03:20:18 +00:00
32 lines
894 B
Markdown
32 lines
894 B
Markdown
---
|
|
icon: log
|
|
title: 'Migration Guide'
|
|
order: 22
|
|
---
|
|
|
|
## Overview
|
|
|
|
v2.0 branch is a complete refactor of pocketpy in C11,
|
|
which enables users to run pocketpy on platforms that do not support C++.
|
|
Also we redesign the core interpreter to be more efficient and maintainable
|
|
by using modern C11 language features.
|
|
This document describes the API changes from v1.x to v2.0.
|
|
|
|
## API compatibility
|
|
|
|
| name | v1.x | v2.0 |
|
|
| --- | --- | --- |
|
|
| legacy C++ API (v1.x only) | ✅ | ❌ |
|
|
| legacy C API (v1.x only) | ✅ | ❌ |
|
|
| C11 API (v2.0 only) | ❌ | ✅ |
|
|
| pybind11 API (both) | ✅ | ✅ |
|
|
|
|
## Suggestions
|
|
|
|
- If you are a C++ user
|
|
- Use **pybind11 API** if you want to upgrade to v2.0 in the future
|
|
- Use **legacy C++ API** if you want to stay in v1.x
|
|
- If you are a C user
|
|
- Use **v2.0's C11 API** (will be available soon)
|
|
- Use **legacy C API** if you want to stay in v1.x
|