Skip to content

Commit 6d43d8d

Browse files
tlaplacaKeavon
andauthored
Fix file paths mentioned in website's Contribute page (#1052)
* Updated paths for frontend / backend communication section of contribute page to reflect current project structure * Added starting / for consistency with other paths on the page * Mapping actually happens in subscription router * Changed path to show code that dispatches FrontendMessage rather than the type def * Missing / at start of path * Fix files --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
1 parent 8eeeb18 commit 6d43d8d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

website/content/contribute/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ The Editor's frontend web code lives in `/frontend/src` and the backend Rust cod
6868

6969
### Frontend/backend communication.
7070

71-
Frontend (JS) -> backend (Rust/wasm) communication is achieved through a thin Rust translation layer in `/frontend/wasm/editor_api.rs` which wraps the Editor backend's complex Rust data type API and provides the JS with a simpler API of callable functions. These wrapper functions are compiled by wasm-bindgen into autogenerated JS functions that serve as an entry point into the wasm.
71+
Frontend (JS) -> backend (Rust/wasm) communication is achieved through a thin Rust translation layer in `/frontend/wasm/src/editor_api.rs` which wraps the Editor backend's complex Rust data type API and provides the JS with a simpler API of callable functions. These wrapper functions are compiled by wasm-bindgen into autogenerated JS functions that serve as an entry point into the wasm.
7272

73-
Backend (Rust) -> frontend (JS) communication happens by sending a queue of messages to the frontend message dispatcher. After the JS calls any wrapper API function to get into backend (Rust) code execution, the Editor's business logic runs and queues up `FrontendMessage`s (defined in `editor/src/frontend/frontend_message_handler.rs`) which get mapped from Rust to JS-friendly data types in `frontend/src/dispatcher/js-messages.ts`. Various JS code subscribes to these messages by calling `subscribeJsMessage(MessageName, (messageData) => { /* callback code */ });`.
73+
Backend (Rust) -> frontend (JS) communication happens by sending a queue of messages to the frontend message dispatcher. After the JS calls any wrapper API function to get into backend (Rust) code execution, the Editor's business logic runs and queues up `FrontendMessage`s (defined in `/editor/src/messages/frontend/frontend_message.rs`) which get mapped from Rust to JS-friendly data types in `/frontend/src/wasm-communication/messages.ts`. Various JS code subscribes to these messages by calling `subscribeJsMessage(MessageName, (messageData) => { /* callback code */ });`.
7474

7575
### The Editor backend and Legacy Document modules.
7676

0 commit comments

Comments
 (0)