Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
14282b7
wip: Gear Env Client
vobradovich Aug 6, 2025
a2c5015
wip: env impl
vobradovich Aug 7, 2025
c83671d
wip: env impl
vobradovich Aug 8, 2025
e697db3
wip: env
vobradovich Aug 11, 2025
5c63597
wip: envs
vobradovich Aug 12, 2025
62a821a
wip: Client Gen
vobradovich Aug 12, 2025
c190cf6
wip: cleint gen, events, mocks
vobradovich Aug 13, 2025
32f4da0
wip: rmrk example
vobradovich Aug 27, 2025
6816f14
wip: ping pong
vobradovich Aug 28, 2025
1f01c5b
wip: env deploy, DefaultEnv
vobradovich Aug 29, 2025
cb1f409
wip: remove MockEnv
vobradovich Sep 2, 2025
07eb92d
wip: gclient tests
vobradovich Sep 2, 2025
c40c98e
wip: event listener, names
vobradovich Sep 3, 2025
4c98831
Merge branch 'master' into vo/client-v2-draft
vobradovich Sep 3, 2025
1a393e1
wip: fix clippy, cleanup
vobradovich Sep 4, 2025
374260f
wip: benchmarks refactoring
vobradovich Sep 4, 2025
f2803c5
wip: gstd future with redirect
vobradovich Sep 5, 2025
e0fb024
wip: bench redirect
vobradovich Sep 5, 2025
1db71f4
Merge branch 'master' into vo/client-v2-draft
vobradovich Sep 8, 2025
57fbccd
wip: cleanup, fix clippy
vobradovich Sep 8, 2025
501708e
fix: client gen full path
vobradovich Sep 8, 2025
5e50a9b
fix: cli program template
vobradovich Sep 9, 2025
02b778a
chore: optimizations
vobradovich Sep 10, 2025
88ba3d1
wip: opt, code remove
vobradovich Sep 10, 2025
4044c93
wip: redirect opt
vobradovich Sep 10, 2025
4ad6e98
fix: logs
vobradovich Sep 11, 2025
227504e
wip: gtest env query
vobradovich Sep 11, 2025
94ca161
wip: gclient, gtest funcs, remove old code
vobradovich Sep 12, 2025
f74a505
chore: refactor
vobradovich Sep 12, 2025
f1d852f
perf: remove params & payload from GtsdFuture::MessageWithRedirect
vobradovich Sep 16, 2025
223e13a
fix: typo GstdFuture
vobradovich Sep 18, 2025
0c92d8b
perf: return encoded payload to GstdFuture::MessageWithRedirect
vobradovich Sep 19, 2025
a308153
fix: comments, send_one_way
vobradovich Sep 23, 2025
6ecacc2
wip: gstd_env PendingCall::poll opt
vobradovich Sep 29, 2025
0abcc4c
chore: improve readability, but at the cost of gas
vobradovich Sep 29, 2025
ac3c9cb
feat: add ping-pong example w/ message stacking
vobradovich Sep 17, 2025
a8da782
feat: create second Ping program from first one
vobradovich Sep 29, 2025
022543f
wip: asyn runtime pure perf
vobradovich Sep 23, 2025
7d59d61
wip: async runtime timeouts
vobradovich Sep 24, 2025
b9010d7
wip: refactor, opt
vobradovich Sep 24, 2025
1cc1d00
wip: refactor, opt
vobradovich Sep 25, 2025
f1c63fb
wip: locks opt
vobradovich Sep 25, 2025
1c6df3d
wip: use Vec for locks
vobradovich Sep 29, 2025
c12506a
wip: compare locks, prefer WaitUpTo
vobradovich Sep 29, 2025
978250b
wip: replace `?` with `ok!`, remove double hashing in WakeSignals::poll
vobradovich Sep 29, 2025
7326a07
wip: replace retain w/ swap_remove
vobradovich Sep 29, 2025
8793d1f
wip: Lock struct, WaitType enum
vobradovich Sep 29, 2025
e4b80f0
wip: use Lock in GstdParams. remove deadline recalc
vobradovich Oct 1, 2025
9d4bdb8
wip: reply hooks (old)
vobradovich Oct 1, 2025
4215d8c
wip: move reply_hook to WakeSignal, remove HashMap
vobradovich Oct 2, 2025
ee0c1ad
wip: micro perf
vobradovich Oct 3, 2025
68b5d8f
wip: add comments
vobradovich Oct 3, 2025
7968115
wip: add Task::clear(), call in handle_signal()
vobradovich Oct 6, 2025
23fad29
wip: ethexe, docs, tests
vobradovich Oct 7, 2025
7bd9c1b
wip: add critical_hook
vobradovich Oct 8, 2025
8630249
wip: refactor
vobradovich Oct 8, 2025
fdc4a5e
wip: use BinaryHeap for locks, lazy remove locks
vobradovich Oct 8, 2025
673daae
wip: lazy removal lock in `next_lock` call
vobradovich Oct 9, 2025
b806243
wip: add `sleep_for`
vobradovich Oct 9, 2025
69dbe78
wip: move Timeout processing to `poll` fn, store deadline in WakeSign…
vobradovich Oct 10, 2025
24d6127
feat: add feature `async_runtime`
vobradovich Oct 10, 2025
5acecf7
feat: add Syscall::read_bytes, Syscall::system_reserve_gas
vobradovich Oct 13, 2025
1b643d4
Merge branch 'master' into vo/async-runtime
vobradovich Oct 16, 2025
da2dd39
bench: fix message_stack units
vobradovich Oct 17, 2025
4026d4c
Merge branch 'vo/fix-stack-bench-unit' into vo/async-runtime
vobradovich Oct 17, 2025
9052f9b
wip: rename WakeSignal::Timeout to Expired, fix `send_one_way`
vobradovich Oct 17, 2025
c1367c1
Merge branch 'master' into vo/async-runtime
vobradovich Oct 20, 2025
a093c86
fix: clippy
vobradovich Oct 20, 2025
804460a
fix: tests
vobradovich Oct 20, 2025
cf08be8
fix: cfg features
vobradovich Oct 22, 2025
427c8cc
fix: remove entrye before hook exec on WakeSignal::Expired
vobradovich Oct 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The model decides when to escalate
approval_policy = "on-request"
model_reasoning_effort = "high"
model_reasoning_summary = "detailed"
18 changes: 9 additions & 9 deletions benchmarks/bench_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
"317810": 43147409792
},
"counter": {
"async_call": 851480134,
"sync_call": 678859589
"async_call": 804844249,
"sync_call": 638234270
},
"cross_program": {
"median": 2436719419
"median": 2242192684
},
"redirect": {
"median": 3474613683
"median": 3199953137
},
"message_stack": {
"0": 799115685,
"1": 3769584063,
"5": 15693086906,
"10": 29592077575,
"20": 63989367411
"0": 701611001,
"1": 3367742913,
"5": 14063393437,
"10": 26273493888,
"20": 51793560821
}
}
25 changes: 13 additions & 12 deletions examples/demo/app/src/chaos/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sails_rs::gstd::debug;
use sails_rs::gstd::{Lock, debug};
use sails_rs::{gstd, prelude::*};

static mut REPLY_HOOK_COUNTER: u32 = 0;
Expand All @@ -10,9 +10,7 @@ impl ChaosService {
#[export]
pub async fn panic_after_wait(&self) {
let source = Syscall::message_source();
let _ = gstd::msg::send_for_reply::<()>(source, (), 0, 0)
.unwrap()
.await;
let _ = gstd::send_for_reply::<()>(source, (), 0).unwrap().await;
debug!("Message received, now panicking!");
panic!("Simulated panic after wait");
}
Expand All @@ -22,16 +20,19 @@ impl ChaosService {
let source = Syscall::message_source();
debug!("before handle_reply");

let fut = gstd::msg::send_for_reply::<()>(source, (), 0, 10_000_000_000).unwrap();
let fut = fut
.handle_reply(|| {
let fut = gstd::send_bytes_for_reply(
source,
&[],
0,
Lock::up_to(1),
None,
Some(10_000_000_000),
Some(Box::new(|| {
unsafe { REPLY_HOOK_COUNTER += 1 };
debug!("handle_reply triggered");
})
.unwrap()
.up_to(Some(1))
.unwrap();

})),
)
.unwrap();
let _ = fut.await;
debug!("after handle_reply");
}
Expand Down
4 changes: 1 addition & 3 deletions examples/event-routes/app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ impl Service {
pub async fn foo(&mut self) {
let source = Syscall::message_source();
self.emit_event(Events::Start).unwrap();
let _res = gstd::msg::send_for_reply(source, self.0, 0, 0)
.unwrap()
.await;
let _res = gstd::send_for_reply(source, self.0, 0).unwrap().await;
self.emit_event(Events::End).unwrap();
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/ping-pong-stack/tests/gtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn create_env() -> (GtestEnv, CodeId, GasUnit) {

let system = System::new();
system.init_logger_with_default_filter(
"gwasm=debug,gtest=info,sails_rs=debug,ping_pong_stack=debug",
"gwasm=debug,gtest=info,sails_rs=debug,ping_pong_stack=debug,gstd=debug",
);
system.mint_to(ACTOR_ID, 1_000_000_000_000_000);
// Submit program code into the system
Expand Down
3 changes: 2 additions & 1 deletion rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ log = { workspace = true, optional = true }
tokio = { workspace = true, features = ["rt", "macros"] }

[features]
default = ["gstd"]
default = ["gstd", "async-runtime"]
build = ["client-builder", "wasm-builder"]
debug = ["gstd?/debug"]
ethexe = [
Expand All @@ -66,3 +66,4 @@ client-builder = ["std", "idl-gen", "dep:sails-client-gen", "dep:convert_case"]
mockall = ["std", "dep:mockall"]
std = ["futures/std"]
wasm-builder = ["dep:gwasm-builder"]
async-runtime = ["gstd"]
Loading