@@ -147,12 +147,13 @@ The native module is built using NAPI-RS and provides cross-platform support:
147147
148148- Platform-specific builds are named ` cel-typescript.<platform>-<arch>.node `
149149 (e.g., ` cel-typescript.darwin-arm64.node ` for Apple Silicon Macs)
150- - NAPI-RS generates a platform-agnostic loader (` index.js ` ) that automatically
151- detects the current platform and loads the appropriate ` .node ` file
152- - The module interface is defined in ` src/binding.d.ts ` which declares the types
153- for the native module
154- - At runtime, the TypeScript wrapper (` src/index.ts ` ) uses the NAPI-RS loader to
155- dynamically load the correct native module
150+ - NAPI-RS generates a platform-agnostic loader ([ ` index.js ` ] ( ./index.js ) ) that
151+ automatically detects the current platform and loads the appropriate ` .node `
152+ file
153+ - The module interface is defined in [ ` index.d.ts ` ] ( ./index.d.ts ) which declares
154+ the types for the native module
155+ - At runtime, the TypeScript wrapper ([ ` src/index.ts ` ] ( ./src/index.ts ) ) uses the
156+ NAPI-RS loader to dynamically load the correct native module
156157- This structure allows for seamless cross-platform distribution while
157158 maintaining platform-specific optimizations
158159
@@ -194,16 +195,19 @@ webpack or Rollup can exclude the unused code.
194195
195196When you build this project:
196197
197- 1 . The Rust code in ` src/lib.rs ` is compiled into a native Node.js addon
198- (` .node ` file) using NAPI-RS
199- 2 . The TypeScript code in ` src/index.ts ` is compiled to JavaScript
198+ 1 . The Rust code in [ ` src/lib.rs ` ] ( ./src/lib.rs ) is compiled into a native
199+ Node.js addon (` .node ` file) using NAPI-RS
200+ 2 . The TypeScript code in [ ` src/index.ts ` ] ( ./src/index.ts ) is compiled to
201+ JavaScript
2002023 . The native module is loaded by Node.js when you import the package
201203
202204The build process creates several important files:
203205
204206- ` .node ` file: The compiled native module containing the Rust code
205- - ` index.js ` : The compiled JavaScript wrapper around the native module
206- - ` index.d.ts ` : TypeScript type definitions generated from the Rust code
207+ - [ ` index.js ` ] ( ./index.js ) : The compiled JavaScript wrapper around the native
208+ module
209+ - [ ` index.d.ts ` ] ( ./index.d.ts ) : TypeScript type definitions generated from the
210+ Rust code
207211
208212## Contributing
209213
0 commit comments