From 1d79ba5d03acaf2a25dea6abef2f757c37df26c3 Mon Sep 17 00:00:00 2001 From: fahdfady Date: Mon, 8 Sep 2025 03:01:18 +0300 Subject: [PATCH 1/2] remove usage of metacall::switch and some edits in Rust docs --- source/ports/rs_port/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/src/lib.rs b/source/ports/rs_port/src/lib.rs index 328236d57..3cfb34485 100644 --- a/source/ports/rs_port/src/lib.rs +++ b/source/ports/rs_port/src/lib.rs @@ -41,11 +41,11 @@ //! Now let's jump into Rust: //! //! ``` -//! use metacall::{switch, metacall, loaders}; +//! use metacall::{initialize, metacall, load}; //! //! fn main() { //! // Initialize MetaCall at the top -//! let _metacall = switch::initialize().unwrap(); +//! let _metacall = initialize().unwrap(); //! //! // Load the file (Checkout the loaders module for loading multiple files //! // or loading from string) From 7ae2bb7d6b084b62ac6c9448de95b43778b233fa Mon Sep 17 00:00:00 2001 From: fahdfady Date: Mon, 8 Sep 2025 14:53:36 +0300 Subject: [PATCH 2/2] edit rs_port readme to metacall 4.4 Signed-off-by: fahdfady --- source/ports/rs_port/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ports/rs_port/README.md b/source/ports/rs_port/README.md index 06f77ab06..8b9a5531c 100644 --- a/source/ports/rs_port/README.md +++ b/source/ports/rs_port/README.md @@ -26,11 +26,11 @@ export function sum(a: number, b: number): number { `main.rs` ``` rust -use metacall::{switch, metacall, loaders}; +use metacall::{initialize, metacall, load}; fn main() { // Initialize MetaCall at the top - let _metacall = switch::initialize().unwrap(); + let _metacall = initialize().unwrap(); // Load the file load::from_single_file("ts", "sum.ts").unwrap();