Skip to content

Commit 91c9939

Browse files
committed
docs: update the library integration guide
1 parent 5b3570e commit 91c9939

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

README-ZH.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ target_link_libraries(my_application PRIVATE mpf::mpf)
123123

124124
```cpp
125125
#include <iostream>
126-
#include <mpf/transpiler.hpp>
126+
#include <mpf/mpf.hpp>
127127

128128
int main() {
129129
mpf::TranspileOptions options;
@@ -145,6 +145,8 @@ int main() {
145145

146146
安装包提供 `core``javascript``cpp` component,以及 `mpf::core``mpf::backend-javascript``mpf::backend-cpp` 和统一入口 `mpf::mpf`。完整集成示例见 [`examples/embedding`](examples/embedding)
147147

148+
MPF 0.x 有意只安装静态库。共享库需要先明确符号导出、allocator/所有权和版本协商契约;设置 `BUILD_SHARED_LIBS` 不会把当前内部 C++ ABI 意外暴露为受支持的动态库接口。
149+
148150
## 构建配置
149151

150152
| CMake 选项 | 默认值 | 用途 |

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Minimal example:
123123

124124
```cpp
125125
#include <iostream>
126-
#include <mpf/transpiler.hpp>
126+
#include <mpf/mpf.hpp>
127127

128128
int main() {
129129
mpf::TranspileOptions options;
@@ -145,6 +145,8 @@ int main() {
145145

146146
The installed package provides the `core`, `javascript`, and `cpp` components; the `mpf::core`, `mpf::backend-javascript`, and `mpf::backend-cpp` targets; and the unified `mpf::mpf` entry point. See [`examples/embedding`](examples/embedding) for a complete integration example.
147147

148+
MPF 0.x installs static libraries deliberately. A supported shared-library ABI will require an explicit symbol-export, allocator/ownership, and version-negotiation contract; setting `BUILD_SHARED_LIBS` does not silently expose the current internal C++ ABI.
149+
148150
## Build Configuration
149151

150152
| CMake option | Default | Purpose |

0 commit comments

Comments
 (0)