Skip to content

Commit 9ec6250

Browse files
proggeramlugRalph Küpper
andauthored
docs: regenerate the API reference (#8744)
Lands #8742. Regenerates `docs/src/api/reference.md` and `docs/api/perry.d.ts` from the compile-time manifest, clearing the release-blocking api-docs-drift check. Verified against the source of truth rather than by rebuilding: the manifest at `crates/perry-api-manifest/src/entries.rs` declares the `ffi` module, and `entries/part_1.rs` carries exactly the six entries the generated `.d.ts` now exposes -- `method("ffi", …)` for dlopen, getRawPointer, toArrayBuffer, toBuffer and toString, plus `property("ffi", "suffix")`. One-to-one, no extras on either side. The disappearing `@perryStub stage ≥2 — not yet implemented, throws at runtime (#6562)` markers are correct: #8704 implemented that surface and closed #6562, and the remaining #6562 mentions in the manifest are comments describing the implementation rather than stub annotations. Coverage moves 2,059 entries / 134 modules -> 2,065 / 135. A changelog fragment was added; the PR had neither one nor a skip-changelog label. No version bump. Co-authored-by: Ralph Küpper <ralph@skelpo.com>
1 parent f444a51 commit 9ec6250

3 files changed

Lines changed: 42 additions & 11 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Regenerated the checked-in API reference and TypeScript declarations from the compile-time manifest, picking up the `ffi` module that #8704 added and dropping the `@perryStub … (#6562)` markers from the entries it implemented. Coverage moves from 2,059 entries across 134 modules to 2,065 across 135. This clears the release-blocking api-docs-drift check.

docs/api/perry.d.ts

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Auto-generated from Perry's API manifest (#465). Do not edit by hand.
22
// Source: perry-api-manifest::API_MANIFEST
3-
// Coverage: 2059 entries across 134 modules
3+
// Coverage: 2065 entries across 135 modules
44

55
type PerryI8 = number & { readonly __perryI8?: never };
66
type PerryI16 = number & { readonly __perryI16?: never };
@@ -370,26 +370,26 @@ declare module "bun:ffi" {
370370
/** stdlib */
371371
export const FFIType: any;
372372
/** stdlib */
373+
export const read: any;
374+
/** stdlib */
373375
export const suffix: any;
374-
/** stdlib @perryStub stage 3 — not yet implemented, throws at runtime (#6562) */
376+
/** stdlib */
375377
export function CFunction(...args: any[]): any;
376378
/** stdlib */
377379
export function CString(...args: any[]): any;
378380
/** stdlib */
379381
export function JSCallback(...args: any[]): any;
380382
/** stdlib */
381383
export function dlopen(...args: any[]): any;
382-
/** stdlib @perryStub stage ≥2 — not yet implemented, throws at runtime (#6562) */
384+
/** stdlib */
383385
export function linkSymbols(...args: any[]): any;
384386
/** stdlib */
385387
export function ptr(...args: any[]): any;
386-
/** stdlib @perryStub stage ≥2 — not yet implemented, throws at runtime (#6562) */
387-
export function read(...args: any[]): any;
388388
/** stdlib */
389389
export function toArrayBuffer(...args: any[]): any;
390390
/** stdlib */
391391
export function toBuffer(...args: any[]): any;
392-
/** stdlib @perryStub stage ≥2 — not yet implemented, throws at runtime (#6562) */
392+
/** stdlib */
393393
export function viewSource(...args: any[]): any;
394394
}
395395

@@ -1585,6 +1585,21 @@ declare module "fetch" {
15851585
export default function (...args: any[]): any;
15861586
}
15871587

1588+
declare module "ffi" {
1589+
/** stdlib */
1590+
export const suffix: any;
1591+
/** stdlib */
1592+
export function dlopen(...args: any[]): any;
1593+
/** stdlib */
1594+
export function getRawPointer(...args: any[]): any;
1595+
/** stdlib */
1596+
export function toArrayBuffer(...args: any[]): any;
1597+
/** stdlib */
1598+
export function toBuffer(...args: any[]): any;
1599+
/** stdlib */
1600+
export function toString(...args: any[]): any;
1601+
}
1602+
15881603
declare module "fs" {
15891604
/** stdlib */
15901605
export class Dir { [key: string]: any; }

docs/src/api/reference.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This page is auto-generated from Perry's compile-time API manifest (`perry-api-manifest::API_MANIFEST`). It is the source of truth for what `perry compile` accepts; references to symbols not listed here produce `R005 UnimplementedApi` (issue #463). Stubs (#464) are flagged ⚠ — they link cleanly but no-op at runtime on the chosen target.
44

5-
Total: 3009 entries across 136 modules.
5+
Total: 3015 entries across 137 modules.
66

77
## Modules
88

@@ -52,6 +52,7 @@ Total: 3009 entries across 136 modules.
5252
- [`exponential-backoff`](#exponential-backoff)
5353
- [`fastify`](#fastify)
5454
- [`fetch`](#fetch)
55+
- [`ffi`](#ffi)
5556
- [`fs`](#fs)
5657
- [`fs/promises`](#fspromises)
5758
- [`http`](#http)
@@ -437,20 +438,20 @@ Total: 3009 entries across 136 modules.
437438

438439
### Methods
439440

440-
- `CFunction` — module**stub** — stage 3 — not yet implemented, throws at runtime (#6562)
441+
- `CFunction` — module
441442
- `CString` — module
442443
- `JSCallback` — module
443444
- `dlopen` — module
444-
- `linkSymbols` — module**stub** — stage ≥2 — not yet implemented, throws at runtime (#6562)
445+
- `linkSymbols` — module
445446
- `ptr` — module
446-
- `read` — module ⚠ **stub** — stage ≥2 — not yet implemented, throws at runtime (#6562)
447447
- `toArrayBuffer` — module
448448
- `toBuffer` — module
449-
- `viewSource` — module**stub** — stage ≥2 — not yet implemented, throws at runtime (#6562)
449+
- `viewSource` — module
450450

451451
### Properties
452452

453453
- `FFIType`
454+
- `read`
454455
- `suffix`
455456

456457
## `bun:sqlite`
@@ -1426,6 +1427,20 @@ Total: 3009 entries across 136 modules.
14261427

14271428
- `default` — module
14281429

1430+
## `ffi`
1431+
1432+
### Methods
1433+
1434+
- `dlopen` — module
1435+
- `getRawPointer` — module
1436+
- `toArrayBuffer` — module
1437+
- `toBuffer` — module
1438+
- `toString` — module
1439+
1440+
### Properties
1441+
1442+
- `suffix`
1443+
14291444
## `fs`
14301445

14311446
### Classes

0 commit comments

Comments
 (0)