From e85445adb5d54fc56fbfe079ed71b86478d14dd1 Mon Sep 17 00:00:00 2001 From: fffonion Date: Mon, 16 Nov 2026 02:45:25 +0800 Subject: [PATCH 1/2] build(core): repin RustScript to 2f433eda --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- src/repl_client.rs | 2 +- tests/ffi.rs | 2 +- tests/frozen_core_consumer.rs | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d097ab2..34dee14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -129,7 +129,7 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pd-host-function" version = "0.1.0" -source = "git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8179640a8ffe460a64b3690e35c2f7eb73#fc8b0c8179640a8ffe460a64b3690e35c2f7eb73" +source = "git+https://github.com/rustscript-lang/rustscript.git?rev=2f433edab3f1907e8cb060e901357d7e2af016ce#2f433edab3f1907e8cb060e901357d7e2af016ce" dependencies = [ "pd-host-schema", "proc-macro2", @@ -140,7 +140,7 @@ dependencies = [ [[package]] name = "pd-host-schema" version = "0.1.0" -source = "git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8179640a8ffe460a64b3690e35c2f7eb73#fc8b0c8179640a8ffe460a64b3690e35c2f7eb73" +source = "git+https://github.com/rustscript-lang/rustscript.git?rev=2f433edab3f1907e8cb060e901357d7e2af016ce#2f433edab3f1907e8cb060e901357d7e2af016ce" dependencies = [ "proc-macro2", "syn", @@ -149,7 +149,7 @@ dependencies = [ [[package]] name = "pd-vm" version = "0.1.0" -source = "git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8179640a8ffe460a64b3690e35c2f7eb73#fc8b0c8179640a8ffe460a64b3690e35c2f7eb73" +source = "git+https://github.com/rustscript-lang/rustscript.git?rev=2f433edab3f1907e8cb060e901357d7e2af016ce#2f433edab3f1907e8cb060e901357d7e2af016ce" dependencies = [ "base64", "futures-channel", @@ -169,7 +169,7 @@ dependencies = [ [[package]] name = "pd-vm-nostd" version = "0.1.0" -source = "git+https://github.com/rustscript-lang/rustscript.git?rev=fc8b0c8179640a8ffe460a64b3690e35c2f7eb73#fc8b0c8179640a8ffe460a64b3690e35c2f7eb73" +source = "git+https://github.com/rustscript-lang/rustscript.git?rev=2f433edab3f1907e8cb060e901357d7e2af016ce#2f433edab3f1907e8cb060e901357d7e2af016ce" [[package]] name = "proc-macro2" diff --git a/Cargo.toml b/Cargo.toml index d2bd335..64145f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,9 +30,9 @@ wifi = [] bluetooth = [] [dependencies] -pd_vm_nostd = { package = "pd-vm-nostd", git = "https://github.com/rustscript-lang/rustscript.git", rev = "fc8b0c8179640a8ffe460a64b3690e35c2f7eb73", version = "0.1.0", optional = true } +pd_vm_nostd = { package = "pd-vm-nostd", git = "https://github.com/rustscript-lang/rustscript.git", rev = "2f433edab3f1907e8cb060e901357d7e2af016ce", version = "0.1.0", optional = true } serialport = { version = "4.8.1", default-features = false, optional = true } -vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "fc8b0c8179640a8ffe460a64b3690e35c2f7eb73", version = "0.1.0", default-features = false, optional = true } +vm = { package = "pd-vm", git = "https://github.com/rustscript-lang/rustscript.git", rev = "2f433edab3f1907e8cb060e901357d7e2af016ce", version = "0.1.0", default-features = false, optional = true } [profile.release] opt-level = "z" diff --git a/src/repl_client.rs b/src/repl_client.rs index 8af8110..8b52c75 100644 --- a/src/repl_client.rs +++ b/src/repl_client.rs @@ -775,7 +775,7 @@ mod tests { let mut transport = VmTransport::default(); session .eval( - "let text: Option = Option::Some(\"hello\");", + "let text: Option = Some(\"hello\");", &mut transport, ) .unwrap(); diff --git a/tests/ffi.rs b/tests/ffi.rs index 94ad17d..dbbc80f 100644 --- a/tests/ffi.rs +++ b/tests/ffi.rs @@ -353,7 +353,7 @@ fn stateful_repl_rejects_moved_optional_string_before_transport() { }; session .eval( - "let text: Option = Option::Some(\"hello\");", + "let text: Option = Some(\"hello\");", &mut transport, ) .unwrap(); diff --git a/tests/frozen_core_consumer.rs b/tests/frozen_core_consumer.rs index 570d8f5..3cec3c7 100644 --- a/tests/frozen_core_consumer.rs +++ b/tests/frozen_core_consumer.rs @@ -9,7 +9,7 @@ use std::process::Command; use rustscript_embedded::{RunOutcome, run_source_file}; use vm::{compile_source_file, decode_program, encode_program}; -const FROZEN_RUSTSCRIPT_REV: &str = "fc8b0c8179640a8ffe460a64b3690e35c2f7eb73"; +const FROZEN_RUSTSCRIPT_REV: &str = "2f433edab3f1907e8cb060e901357d7e2af016ce"; const RUSTSCRIPT_GIT: &str = "https://github.com/rustscript-lang/rustscript.git"; const EXPECTED_BUNDLED_RSS: usize = 4; const REQUIRED_LOCK_PACKAGES: &[&str] = From ed79e641527a278bd3d81a829a7a9154a93a0182 Mon Sep 17 00:00:00 2001 From: Alliumcepa Triplef Date: Mon, 16 Nov 2026 04:42:06 +0800 Subject: [PATCH 2/2] docs: use current unit syntax --- docs/framework-api.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/framework-api.md b/docs/framework-api.md index d2632d4..6bf46f9 100644 --- a/docs/framework-api.md +++ b/docs/framework-api.md @@ -48,7 +48,7 @@ from the firmware. The Arduino host simulator never registers either module. The signatures below are RSS signatures. Argument type, arity, and range checks happen in the host bridge. A rejected call returns a host-dispatch error to the VM. A `bool` result reports whether the -underlying platform operation was accepted. Calls documented as `null` are commands whose success +underlying platform operation was accepted. Calls documented as `()` are commands whose success is represented by normal completion. ## GPIO @@ -78,7 +78,7 @@ ESP32-C3 only: use i2c; i2c::open(sda: int, scl: int, frequency: int) -> bool -i2c::close() -> null +i2c::close() -> () i2c::transmit(address: int, data: bytes) -> int i2c::transmit_register(address: int, register: int, data: bytes) -> int i2c::receive(address: int, length: int) -> bytes @@ -95,16 +95,16 @@ empty byte sequence. ```rust use mcu; -mcu::delay_ms(duration: int) -> null -mcu::delay_us(duration: int) -> null +mcu::delay_ms(duration: int) -> () +mcu::delay_us(duration: int) -> () mcu::millis() -> int mcu::micros() -> int mcu::cpu_frequency_mhz() -> int mcu::free_heap() -> int mcu::flash_size() -> int mcu::random() -> int -mcu::restart() -> null -mcu::deep_sleep_us(duration: int) -> null +mcu::restart() -> () +mcu::deep_sleep_us(duration: int) -> () ``` On ESP32-C3, `delay_ms` accepts `0..60,000`, `delay_us` accepts `0..1,000,000`, and deep sleep @@ -117,7 +117,7 @@ millisecond value. `millis` and `micros` are monotonic uptime counters. `restart ```rust use serial; -serial::write_line(value: string) -> null +serial::write_line(value: string) -> () serial::available() -> int serial::read_bytes(maximum: int) -> bytes ``` @@ -172,7 +172,7 @@ The Rust static library exports `rustscript_run_vmbc` and value types from (context, import_name_bytes, arguments, result) -> status ``` -A callback status of `-1` rejects the call, `0` completes a command with `null`, and `1` returns the +A callback status of `-1` rejects the call, `0` completes a command with `()`, and `1` returns the value written to `result`. String and byte results reference bridge-owned storage and are consumed by the VM during the call. Platform implementations are located in: