You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,15 @@ The process of adding an extension involves the following steps:
23
23
4. Add a new directory in `src/ext/extension_name`. It will contain `mod.rs` and `init_extension_name.js`
24
24
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
25
25
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`
28
29
29
30
- If only one field, add it directly to ExtensionOptions
30
31
- Otherwise add an options structure in `mod.rs` and reference that
31
32
-
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
0 commit comments