docs.rs failed to build oxipage-wasm-0.4.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
WASM 런타임 적재 호스트 v2 (doc/01 §1.4, doc/08 §8.4).
v1 스파이크의 한계 3종을 해결한다:
- Store 재사용: lobby Store+Instance 를
Mutex로 캐싱하여 매 호출 재인스턴스화 제거. - Fuel 제한:
Config::consume_fuel(true)+Store::set_fuel(N)으로 CPU 과다 방지. - HTTP 라우트: route manifest ABI +
handle_request로 WASM 확장이 라우트를 제공. 코어RouteDispatchertrait 구현 → 폴백 핸들러가 디스패치.
추가 capability (doc/08 §8.4 §7):
host_db_query(sql) -> json— read-only SQL (SELECT 만 허용).host_http_get(url) -> body— HTTP GET (도메인 제한 없음, 데모용).
ABI (코어 모듈 export)
| export | 시그니처 | 비고 |
|---|---|---|
memory |
linear memory | --export-memory |
init |
() -> () |
시작 1회; capability 호출 |
ext_id_ptr / ext_id_len |
() -> i32 |
UTF-8 id |
display_name_ptr / display_name_len |
(i32 lang) -> i32 |
0=ko, 1=en |
lobby_card_ptr / lobby_card_len |
() -> i32 |
JSON or 빈 문자열 |
alloc |
(i32 size) -> i32 ptr |
linear memory 할당 (bump) |
reset_alloc |
() -> () |
할당자 리셋 (요청 전) |
route_manifest_ptr / route_manifest_len |
() -> i32 |
JSON 라우트 목록 |
handle_request |
(i32 method, i32 path_ptr, i32 path_len, i32 body_ptr, i32 body_len) -> i64 |
(status << 32) | resp_ptr |
handle_request_len |
() -> i32 |
응답 본문 길이 |
호스트 capability (모듈 import, module="env")
| import | 시그니처 | capability |
|---|---|---|
host_now_unix |
() -> i64 |
현재 epoch 초 (read-only 시계) |
host_log |
(i32 ptr, i32 len) -> () |
tracing 로깅 |
host_db_query |
(i32 sql_ptr, i32 sql_len) -> i64 |
read-only SQL → JSON |
host_http_get |
(i32 url_ptr, i32 url_len) -> i64 |
HTTP GET → body |