Skip to content

Commit 43185f8

Browse files
committed
Update ext docs
1 parent 5a41fa0 commit 43185f8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ The process of adding an extension involves the following steps:
2323
4. Add a new directory in `src/ext/extension_name`. It will contain `mod.rs` and `init_extension_name.js`
2424
5. Navigate to [deno/runtime/js](https://github.com/denoland/deno/tree/main/runtime/js) and find all the places in global the extension is added
2525
6. In `init_extension_name.js`, include -all- JS sources provided by the new extension, and add the relevant portions to global (see other exts for examples)
26-
7. In `mod.rs`, create your `init_extension_name` extensions and provide the `extensions` and `snapshot_extensions` functions
27-
8. If the extension requires configuration, add a feature-gated section to `ExtensionOptions`
26+
7. In `mod.rs`, create your `init_extension_name` extensions and provide the `extensions` function
27+
8. Implement `ExtensionTrait` for the deno_extension and your initializer
28+
9. If the extension requires configuration, add a feature-gated section to `ExtensionOptions`
2829

2930
- If only one field, add it directly to ExtensionOptions
3031
- Otherwise add an options structure in `mod.rs` and reference that
3132
-
32-
9- in `src/ext/mod.rs` add feature-gated imports, and add your extension to the extensions functions -BELOW- any of its dependencies
33-
10- Add a section to the table in `lib.rs` for the new extension, and use `cargo rdme` to regenerate the readme
33+
10- in `src/ext/mod.rs` add feature-gated imports, and add your extension to the extensions functions -BELOW- any of its dependencies
34+
11- Add a section to the table in `lib.rs` for the new extension, and use `cargo rdme` to regenerate the readme
3435

3536
## Project Structure
3637

0 commit comments

Comments
 (0)