repo stringlengths 6 65 | file_url stringlengths 81 311 | file_path stringlengths 6 227 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:31:58 2026-01-04 20:25:31 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/unit_tests/runtime_tests.rs | linera-execution/src/unit_tests/runtime_tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Resource consumption unit tests.
#![cfg(with_tokio_multi_thread)]
use std::{
any::Any,
sync::{Arc, Mutex},
};
use futures::{channel::mpsc, StreamExt};
use linera_base::{crypto::CryptoHash, data_types::BlockHeight, identifiers::A... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/entrypoints.rs | linera-execution/src/wasm/entrypoints.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Wasm entrypoints for contracts and services.
use linera_base::data_types::StreamUpdate;
use linera_witty::wit_import;
/// WIT entrypoints for application contracts.
#[wit_import(package = "linera:app")]
pub trait ContractEntrypoints {
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/runtime_api.rs | linera-execution/src/wasm/runtime_api.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{any::Any, collections::HashMap, marker::PhantomData};
use linera_base::{
data_types::{
Amount, ApplicationPermissions, BlockHeight, Bytecode, SendMessageRequest, Timestamp,
},
http,
identifiers::{Account, Acc... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/mod.rs | linera-execution/src/wasm/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Support for user applications compiled as WebAssembly (Wasm) modules.
//!
//! Requires a WebAssembly runtime to be selected and enabled using one of the following features:
//!
//! - `wasmer` enables the [Wasmer](https://wasmer.io/) runtim... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/wasmer.rs | linera-execution/src/wasm/wasmer.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Code specific to the usage of the [Wasmer](https://wasmer.io/) runtime.
use std::{marker::Unpin, sync::LazyLock};
use linera_base::data_types::{Bytecode, StreamUpdate};
use linera_witty::{
wasmer::{EntrypointInstance, InstanceBuilder... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/module_cache.rs | linera-execution/src/wasm/module_cache.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! A cache of compiled WebAssembly modules.
//!
//! The cache is limited by the total size of cached bytecode files. Note that this is a heuristic to
//! estimate the total memory usage by the cache, since it's currently not possible to deter... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/wasm/wasmtime.rs | linera-execution/src/wasm/wasmtime.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Code specific to the usage of the [Wasmtime](https://wasmtime.dev/) runtime.
use std::sync::LazyLock;
use linera_base::data_types::{Bytecode, StreamUpdate};
use linera_witty::{wasmtime::EntrypointInstance, ExportTo};
use tokio::sync::Mut... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/bin/wit_generator.rs | linera-execution/src/bin/wit_generator.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Generator of WIT files representing the interface between Linera applications and nodes.
#![cfg_attr(any(target_arch = "wasm32", not(with_wasm_runtime)), no_main)]
#![cfg(all(not(target_arch = "wasm32"), with_wasm_runtime))]
use std::{
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/test_utils/solidity.rs | linera-execution/src/test_utils/solidity.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Code for compiling solidity smart contracts for testing purposes.
use std::{
fs::File,
io::Write,
path::{Path, PathBuf},
process::{Command, Stdio},
};
use anyhow::Context;
use revm_primitives::{Address, U256};
use serde_j... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/test_utils/mod.rs | linera-execution/src/test_utils/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod mock_application;
#[cfg(with_revm)]
pub mod solidity;
mod system_execution_state;
use std::{collections::BTreeMap, sync::Arc, thread, vec};
use linera_base::{
crypto::{AccountPublicKey, ValidatorPublicKey},
data_types::{
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/test_utils/system_execution_state.rs | linera-execution/src/test_utils/system_execution_state.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, BTreeSet},
ops::Not,
};
use custom_debug_derive::Debug;
use linera_base::{
crypto::CryptoHash,
data_types::{Amount, ApplicationPermissions, Blob, ChainDescription, Epoch, Timestamp},
iden... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/src/test_utils/mock_application.rs | linera-execution/src/test_utils/mock_application.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Mocking of user applications to help with execution scenario tests.
use std::{
collections::VecDeque,
fmt::{self, Debug, Display, Formatter},
sync::{
atomic::{AtomicUsize, Ordering},
Arc, Mutex,
},
};
#[cf... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/service_runtime_apis.rs | linera-execution/tests/service_runtime_apis.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::field_reassign_with_default)]
use std::{
collections::{BTreeMap, BTreeSet},
vec,
};
use linera_base::{data_types::Amount, identifiers::AccountOwner};
use linera_execution::{
test_utils::{
create_dummy_que... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/test_execution.rs | linera-execution/tests/test_execution.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::field_reassign_with_default)]
use std::{collections::BTreeMap, vec};
use assert_matches::assert_matches;
use linera_base::{
crypto::{AccountPublicKey, ValidatorPublicKey},
data_types::{
Amount, ApplicationPer... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/revm.rs | linera-execution/tests/revm.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg(with_revm)]
use std::sync::Arc;
use alloy_sol_types::{sol, SolCall, SolValue};
use linera_base::{
data_types::{Amount, Blob, BlockHeight, Timestamp},
vm::{EvmInstantiation, EvmOperation, EvmQuery},
};
use linera_execution::{
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/wasm.rs | linera-execution/tests/wasm.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![cfg(with_wasm_runtime)]
use std::sync::Arc;
use linera_base::data_types::{Amount, Blob, BlockHeight, Timestamp};
use linera_execution::{
test_utils::{
create_dummy_user_application_description, dummy_chain_description, SystemE... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/contract_runtime_apis.rs | linera-execution/tests/contract_runtime_apis.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, BTreeSet},
sync::Arc,
vec,
};
use assert_matches::assert_matches;
use linera_base::{
crypto::{AccountPublicKey, CryptoHash},
data_types::{
Amount, ApplicationDescription, Applicat... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/test_system_execution.rs | linera-execution/tests/test_system_execution.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::field_reassign_with_default)]
use linera_base::{
crypto::AccountSecretKey,
data_types::{Amount, BlockHeight, Timestamp},
identifiers::{Account, AccountOwner},
ownership::ChainOwnership,
};
use linera_execution... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-execution/tests/fee_consumption.rs | linera-execution/tests/fee_consumption.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Tests for how the runtime computes fees based on consumed resources.
use std::{collections::BTreeSet, sync::Arc, vec};
use linera_base::{
crypto::AccountPublicKey,
data_types::{Amount, BlockHeight, OracleResponse},
http,
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/build.rs | linera-rpc/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() -> Result<(), Box<dyn std::error::Error>> {
use std::io::Write as _;
let out_dir: std::path::PathBuf = std::env::var("OUT_DIR")?.into();
let no_includes: &[&str] = &[];
tonic_prost_build::configure()
.file_de... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/config.rs | linera-rpc/src/config.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::ffi::OsString;
use clap::Parser;
use linera_base::{crypto::ValidatorPublicKey, identifiers::ChainId};
use serde::{Deserialize, Serialize};
#[cfg(with_simple_network)]
use crate::simple;
#[derive(Clone, Debug, Parser)]
#[cfg_attr(wi... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/lib.rs | linera-rpc/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module provides network abstractions and the data schemas for remote procedure
//! calls (RPCs) in the Linera protocol.
// `tracing::instrument` is not compatible with this nightly Clippy lint
#![allow(unknown_lints)]
pub mod config... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/cross_chain_message_queue.rs | linera-rpc/src/cross_chain_message_queue.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Types and functions common to the gRPC and simple implementations.
#![cfg(with_server)]
use std::{
collections::{hash_map::Entry, HashMap},
future::Future,
time::Duration,
};
use futures::{channel::mpsc, StreamExt as _};
use... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/client.rs | linera-rpc/src/client.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::CryptoHash,
data_types::{BlobContent, BlockHeight, NetworkDescription},
identifiers::{BlobId, ChainId},
};
use linera_chain::{
data_types::BlockProposal,
types::{
ConfirmedBlockCertificate... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/node_provider.rs | linera-rpc/src/node_provider.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::time::Duration;
use linera_core::node::{NodeError, ValidatorNodeProvider};
#[cfg(with_simple_network)]
use crate::simple::SimpleNodeProvider;
use crate::{client::Client, grpc::GrpcNodeProvider};
/// A general node provider w... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/message.rs | linera-rpc/src/message.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::CryptoHash,
data_types::{BlobContent, BlockHeight, NetworkDescription},
identifiers::{BlobId, ChainId},
};
use linera_chain::{
data_types::{BlockPro... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/client.rs | linera-rpc/src/grpc/client.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{fmt, future::Future, iter};
use futures::{future, stream, StreamExt};
use linera_base::{
crypto::CryptoHash,
data_types::{BlobContent, BlockHeight, NetworkDescription},
ensure,
identifiers::{BlobId, ChainId},
tim... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/mod.rs | linera-rpc/src/grpc/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod client;
mod conversions;
mod node_provider;
pub mod pool;
#[cfg(with_server)]
mod server;
pub mod transport;
pub use client::*;
pub use conversions::*;
pub use node_provider::*;
#[cfg(with_server)]
pub use server::*;
pub mod api {
to... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/node_provider.rs | linera-rpc/src/grpc/node_provider.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::str::FromStr as _;
use linera_base::time::Duration;
use linera_core::node::{NodeError, ValidatorNodeProvider};
use super::GrpcClient;
use crate::{
config::ValidatorPublicNetworkConfig,
grpc::{pool::GrpcConnectionPool, transp... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/transport.rs | linera-rpc/src/grpc/transport.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use crate::NodeOptions;
#[derive(Clone, Debug, Default)]
pub struct Options {
pub connect_timeout: Option<linera_base::time::Duration>,
pub timeout: Option<linera_base::time::Duration>,
}
impl From<&'_ NodeOptions> for Options {
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/server.rs | linera-rpc/src/grpc/server.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
net::{IpAddr, SocketAddr},
str::FromStr,
task::{Context, Poll},
};
use futures::{channel::mpsc, future::BoxFuture, FutureExt as _};
use linera_base::{
data_types::Blob,
identifiers::ChainId,
time::{Duration,... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/conversions.rs | linera-rpc/src/grpc/conversions.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{
AccountPublicKey, AccountSignature, CryptoError, CryptoHash, ValidatorPublicKey,
ValidatorSignature,
},
data_types::{BlobContent, BlockHeight, NetworkDescription},
ensure,
identi... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/grpc/pool.rs | linera-rpc/src/grpc/pool.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::time::Duration;
use super::{transport, GrpcError};
/// A pool of transport channels to be used by gRPC.
#[derive(Clone, Default)]
pub struct GrpcConnectionPool {
options: transport::Options,
channels: papaya::HashMap... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/codec.rs | linera-rpc/src/simple/codec.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{io, mem, ops::DerefMut};
use bytes::{Buf, BufMut, BytesMut};
use linera_core::node::NodeError;
use thiserror::Error;
use tokio_util::codec::{Decoder, Encoder};
use crate::RpcMessage;
/// The size of the frame prefix that contains ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/client.rs | linera-rpc/src/simple/client.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::future::Future;
use futures::{sink::SinkExt, stream::StreamExt};
use linera_base::{
crypto::CryptoHash,
data_types::{BlobContent, BlockHeight, NetworkDescription},
ident... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/mod.rs | linera-rpc/src/simple/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod client;
mod codec;
mod node_provider;
#[cfg(with_server)]
mod server;
mod transport;
pub use client::*;
pub use codec::*;
pub use node_provider::*;
#[cfg(with_server)]
pub use server::*;
pub use transport::*;
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/node_provider.rs | linera-rpc/src/simple/node_provider.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::str::FromStr as _;
use linera_core::node::{NodeError, ValidatorNodeProvider};
use super::SimpleClient;
use crate::{config::ValidatorPublicNetworkPreConfig, node_provider::NodeOptions};
/// A client without an address - serves as a ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/transport.rs | linera-rpc/src/simple/transport.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashMap, io, mem, net::SocketAddr, pin::pin, sync::Arc};
use async_trait::async_trait;
use futures::{
future,
stream::{self, FuturesUnordered, SplitSink, Split... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/src/simple/server.rs | linera-rpc/src/simple/server.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::sync::Arc;
use async_trait::async_trait;
use futures::{channel::mpsc, lock::Mutex};
use linera_base::{data_types::Blob, time::Duration};
use linera_core::{
data_types::CrossChainRequest,
node::NodeError,
worker::{NetworkA... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/tests/format.rs | linera-rpc/tests/format.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{AccountPublicKey, AccountSignature, CryptoHash, TestString},
data_types::{BlobContent, ChainDescription, ChainOrigin, OracleResponse, Round},
identifie... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-rpc/tests/transport.rs | linera-rpc/tests/transport.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#[cfg(web)]
wasm_bindgen_test::wasm_bindgen_test_configure!(run_in_browser);
#[cfg_attr(web, wasm_bindgen_test::wasm_bindgen_test)]
#[cfg_attr(not(web), tokio::test(flavor = "current_thread"))]
#[ignore]
// this test currently must be run man... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/build.rs | linera-chain/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() {
cfg_aliases::cfg_aliases! {
web: { all(target_arch = "wasm32", feature = "web") },
with_testing: { any(test, feature = "test") },
with_metrics: { all(not(target_arch = "wasm32"), feature = "metrics") },
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/outbox.rs | linera-chain/src/outbox.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use allocative::Allocative;
use linera_base::data_types::{ArithmeticError, BlockHeight};
#[cfg(with_testing)]
use linera_views::context::MemoryContext;
use linera_views::{
context::Context,
queue_view::QueueView,
register_view::Reg... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/block_tracker.rs | linera-chain/src/block_tracker.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::{BTreeMap, BTreeSet};
use custom_debug_derive::Debug;
#[cfg(with_metrics)]
use linera_base::prometheus_util::MeasureLatency;
use linera_base::{
data_types::{Amount, Blob, BlockHeight, Event, OracleResponse, Timestamp... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/lib.rs | linera-chain/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module manages the state of a Linera chain, including cross-chain communication.
pub mod block;
mod certificate;
pub mod types {
pub use super::{block::*, certificate::*};
}
mod block_tracker;
mod chain;
pub mod data_types;
mod... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/inbox.rs | linera-chain/src/inbox.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use allocative::Allocative;
use async_graphql::SimpleObject;
use linera_base::{
data_types::{ArithmeticError, BlockHeight},
ensure,
identifiers::ChainId,
};
#[cfg(with_testing)]
use linera_views::context::MemoryContext;
use linera_... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/manager.rs | linera-chain/src/manager.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! # Chain manager
//!
//! This module contains the consensus mechanism for all microchains. Whenever a block is
//! confirmed, a new chain manager is created for the next block height. It manages the consensus
//! state until a new block is ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/chain.rs | linera-chain/src/chain.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
collections::{BTreeMap, BTreeSet, HashMap, HashSet},
sync::Arc,
};
use allocative::Allocative;
use linera_base::{
crypto::{CryptoHash, ValidatorPublicKey},
data_types::{
ApplicationDescription, ApplicationPe... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | true |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/block.rs | linera-chain/src/block.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
borrow::Cow,
collections::{BTreeMap, BTreeSet},
fmt::Debug,
};
use allocative::Allocative;
use async_graphql::SimpleObject;
use linera_base::{
crypto::{BcsHashable... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/pending_blobs.rs | linera-chain/src/pending_blobs.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::BTreeMap;
use allocative::Allocative;
use linera_base::{
data_types::{Blob, Round},
ensure,
identifiers::BlobId,
};
use linera_views::{
context::Context,
map_view::MapView,
register_view::Register... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/timeout.rs | linera-chain/src/certificate/timeout.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{ValidatorPublicKey, ValidatorSignature},
data_types::Round,
};
use serde::{
ser::{Serialize, SerializeStruct, Serializer},
Deserialize, Deserialize... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/validated.rs | linera-chain/src/certificate/validated.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{ValidatorPublicKey, ValidatorSignature},
data_types::Round,
};
use serde::{
ser::{Serialize, SerializeStruct, Serializer},
Deserialize, Deserialize... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/mod.rs | linera-chain/src/certificate/mod.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
mod confirmed;
mod generic;
mod lite;
mod timeout;
mod validated;
use std::collections::BTreeSet;
use allocative::Allocative;
pub use generic::GenericCertificate;
use linera_base::{
cry... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/confirmed.rs | linera-chain/src/certificate/confirmed.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{ValidatorPublicKey, ValidatorSignature},
data_types::{Epoch, Round},
identifiers::ChainId,
};
use serde::{ser::SerializeStruct, Deserialize, Deserializ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/lite.rs | linera-chain/src/certificate/lite.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{borrow::Cow, ops::Deref};
use allocative::{Allocative, Key, Visitor};
use linera_base::{
crypto::{ValidatorPublicKey, ValidatorSignature},
data_types::Round,
};
use linera_... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/certificate/generic.rs | linera-chain/src/certificate/generic.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use allocative::{Allocative, Key, Visitor};
use custom_debug_derive::Debug;
use linera_base::{
crypto::{CryptoHash, ValidatorPublicKey, ValidatorSignature},
data_types::Round,
};
use ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/unit_tests/outbox_tests.rs | linera-chain/src/unit_tests/outbox_tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use super::*;
#[tokio::test]
async fn test_outbox() {
let mut view = OutboxStateView::new().await;
assert!(view.schedule_message(BlockHeight::ZERO).unwrap());
assert!(view.schedule_message(BlockHeight::from(2)).unwrap());
asse... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/unit_tests/data_types_tests.rs | linera-chain/src/unit_tests/data_types_tests.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use linera_base::{
crypto::{AccountSecretKey, Ed25519SecretKey, Secp256k1SecretKey, ValidatorKeypair},
data_types::Amount,
};
use super::*;
use crate::{
block::{ConfirmedBlock, V... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/unit_tests/inbox_tests.rs | linera-chain/src/unit_tests/inbox_tests.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use assert_matches::assert_matches;
use linera_base::{crypto::CryptoHash, data_types::Timestamp, identifiers::ApplicationId};
use linera_execution::{Message, MessageKind};
use super::*;
use ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/unit_tests/chain_tests.rs | linera-chain/src/unit_tests/chain_tests.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
#![allow(clippy::large_futures)]
use std::{
collections::{BTreeMap, BTreeSet},
thread,
};
use assert_matches::assert_matches;
use axum::{routing::get, Router};
use linera_base::{
crypto::{AccountPublicKey, ValidatorPublicKey},
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/test/http_server.rs | linera-chain/src/test/http_server.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! A simple HTTP server to use for testing.
use std::{future::IntoFuture, net::Ipv4Addr};
use axum::Router;
use futures::FutureExt as _;
use tokio::{net::TcpListener, sync::oneshot};
/// A handle to a running HTTP server.
///
/// The serve... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/test/mod.rs | linera-chain/src/test/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Test utilities
mod http_server;
use linera_base::{
crypto::{AccountPublicKey, Signer, ValidatorPublicKey},
data_types::{Amount, BlockHeight, Epoch, Round, Timestamp},
identifiers::{Account, AccountOwner, ChainId},
};
use line... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/data_types/mod.rs | linera-chain/src/data_types/mod.rs | // Copyright (c) Facebook, Inc. and its affiliates.
// Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::{BTreeMap, BTreeSet, HashSet};
use allocative::Allocative;
use async_graphql::SimpleObject;
use custom_debug_derive::Debug;
use linera_base::{
bcs,
crypto::{
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-chain/src/data_types/metadata.rs | linera-chain/src/data_types/metadata.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! GraphQL-compatible structured metadata representations for operations and messages.
use async_graphql::SimpleObject;
use linera_base::{
crypto::CryptoHash,
data_types::{Amount, ApplicationPermissions},
hex,
identifiers::{A... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/build.rs | linera-witty-macros/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() {
cfg_aliases::cfg_aliases! {
with_testing: { feature = "test" },
with_wasmer: { feature = "wasmer" },
with_wasmtime: { feature = "wasmtime" },
with_wit_export: {
any(feature = "test", ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_type.rs | linera-witty-macros/src/wit_type.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Derivation of the `WitType` trait.
use heck::ToKebabCase;
use proc_macro2::TokenStream;
use proc_macro_error::abort;
use quote::quote;
use syn::{Attribute, Ident, LitStr, MacroDelimiter, Meta, Variant};
use crate::util::FieldsInformation... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_load.rs | linera-witty-macros/src/wit_load.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Derivation of the `WitLoad` trait.
#[path = "unit_tests/wit_load.rs"]
mod tests;
use proc_macro2::TokenStream;
use proc_macro_error::abort;
use quote::quote;
use syn::{Ident, LitInt, Variant};
use crate::util::FieldsInformation;
/// Re... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/lib.rs | linera-witty-macros/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! # Linera Witty Macros
//!
//! This crate contains the procedural macros used by the `linera-witty` crate.
#![deny(missing_docs)]
mod util;
mod wit_export;
mod wit_import;
mod wit_interface;
mod wit_load;
mod wit_store;
mod wit_type;
use... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_store.rs | linera-witty-macros/src/wit_store.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Derivation of the `WitStore` trait.
use proc_macro2::TokenStream;
use proc_macro_error::abort;
use quote::quote;
use syn::{Ident, LitInt, Variant};
use crate::util::FieldsInformation;
#[path = "unit_tests/wit_store.rs"]
mod tests;
/// ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_interface.rs | linera-witty-macros/src/wit_interface.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Generation of code to generate WIT snippets for an interface.
use std::iter;
use heck::ToKebabCase;
use proc_macro2::TokenStream;
use proc_macro_error::abort;
use quote::quote;
use syn::{FnArg, Ident, LitStr, Pat, PatIdent, PatType, Retu... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_import.rs | linera-witty-macros/src/wit_import.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Generation of code to import functions from a Wasm guest module.
use std::collections::HashSet;
use heck::ToKebabCase;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use quote::{format_ident, quote, quote_spanned, ToT... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/util/fields.rs | linera-witty-macros/src/util/fields.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Helper types to process [`Fields`] from `struct`s and `enum` variants.
use std::{borrow::Cow, ops::Deref};
use heck::ToKebabCase;
use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use syn::{spanned::Spanned, Field, Fields, ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/util/mod.rs | linera-witty-macros/src/util/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Helper types and functions shared between different macro implementations.
mod fields;
mod specialization;
use std::hash::{Hash, Hasher};
use heck::ToKebabCase;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use quot... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/util/specialization.rs | linera-witty-macros/src/util/specialization.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Specialization of types before deriving traits for them.
#[cfg(test)]
#[path = "../unit_tests/specialization.rs"]
mod tests;
use std::{
collections::HashSet,
fmt::{self, Debug, Formatter},
mem,
};
use proc_macro2::{Span, Tok... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/unit_tests/wit_type.rs | linera-witty-macros/src/unit_tests/wit_type.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Unit tests for the `WitType` derive macro.
#![cfg(test)]
use proc_macro2::Span;
use quote::quote;
use syn::{parse_quote, Fields, ItemEnum, ItemStruct, LitStr};
use super::{derive_for_enum, derive_for_struct, discover_wit_name};
/// Che... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/unit_tests/wit_load.rs | linera-witty-macros/src/unit_tests/wit_load.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Unit tests for the `WitLoad` derive macro.
#![cfg(test)]
use quote::quote;
use syn::{parse_quote, Fields, ItemEnum, ItemStruct};
use super::{derive_for_enum, derive_for_struct};
/// Checks the generated code for the body of the impleme... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/unit_tests/wit_store.rs | linera-witty-macros/src/unit_tests/wit_store.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Unit tests for the `WitStore` derive macro.
#![cfg(test)]
use quote::quote;
use syn::{parse_quote, Fields, ItemEnum, ItemStruct};
use super::{derive_for_enum, derive_for_struct};
/// Checks the generated code for the body of the implem... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/unit_tests/specialization.rs | linera-witty-macros/src/unit_tests/specialization.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Unit tests for the `witty_specialize_with` attribute.
use proc_macro2::Span;
use quote::{quote, ToTokens};
use syn::{parse_quote, DeriveInput, Ident};
use super::{super::apply_specialization_attribute, Specialization, Specializations};
... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_export/function_information.rs | linera-witty-macros/src/wit_export/function_information.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Extraction of information and generation of code related to a single exported host function.
use heck::ToKebabCase;
use proc_macro2::{Span, TokenStream};
use proc_macro_error::abort;
use quote::{quote, quote_spanned, ToTokens};
use syn::{... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_export/mod.rs | linera-witty-macros/src/wit_export/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Generation of code to export host functions to a Wasm guest instance.
// TODO(#1683): Remove feature flags by generating runtime agnostic code
#![cfg(with_wit_export)]
mod caller_type_parameter;
mod function_information;
use proc_macro2... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-witty-macros/src/wit_export/caller_type_parameter.rs | linera-witty-macros/src/wit_export/caller_type_parameter.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Representation of a shared generic type parameter for the caller.
use std::collections::HashMap;
use proc_macro2::TokenStream;
use proc_macro_error::abort;
use quote::ToTokens;
use syn::{
punctuated::Punctuated, AngleBracketedGeneric... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/lib.rs | linera-summary/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This crate provides the internal tool to summarize performance changes in PRs.
#![allow(missing_docs)]
pub mod ci_runtime_comparison;
pub mod github;
pub mod performance_summary;
pub mod summary_options;
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/ci_runtime_comparison.rs | linera-summary/src/ci_runtime_comparison.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::BTreeMap;
use anyhow::{ensure, Result};
use octocrab::models::workflows::{Conclusion, Job, Status};
use serde::Serialize;
use tracing::warn;
type WorkflowName = String;
#[derive(Serialize)]
pub struct WorkflowJobRuntim... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/performance_summary.rs | linera-summary/src/performance_summary.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{collections::HashSet, time::Duration};
use anyhow::{bail, Result};
use humantime::format_duration;
use serde::Serialize;
use crate::{ci_runtime_comparison::CiRuntimeComparison, github::Github};
pub const PR_COMMENT_HEADER: &str = ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/github.rs | linera-summary/src/github.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::env;
use anyhow::{anyhow, Context, Result};
use octocrab::{
models::workflows::{Job, Run, WorkFlow},
params::workflows::Filter,
workflows::WorkflowsHandler,
Octocrab,
};
use tracing::info;
use crate::performance_summ... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/main.rs | linera-summary/src/main.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::process;
use anyhow::{Context, Result};
use linera_summary::{
github::Github, performance_summary::PerformanceSummary, summary_options::SummaryOptions,
};
use tracing::{error, Instrument};
use tracing_subscriber::{
prelude::_... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-summary/src/summary_options.rs | linera-summary/src/summary_options.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashSet;
use linera_version::VersionInfo;
#[derive(clap::Parser)]
#[command(
name = "linera-summary",
version = VersionInfo::default_clap_str(),
about = "Executable for performance summary generation.",
)]
p... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/build.rs | linera-sdk/build.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
fn main() {
cfg_aliases::cfg_aliases! {
with_testing: { any(test, feature = "test") },
with_wasm_runtime: { any(feature = "wasmer", feature = "wasmtime") },
with_integration_testing: {
all(not(target_arc... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/ethereum.rs | linera-sdk/src/ethereum.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Support for Linera applications that interact with Ethereum or other EVM contracts.
use std::fmt::Debug;
use async_graphql::scalar;
use async_trait::async_trait;
use linera_base::http;
pub use linera_ethereum::{
client::EthereumQueri... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/lib.rs | linera-sdk/src/lib.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! This module provides an SDK for developing Linera applications using Rust.
//!
//! A Linera application consists of two WebAssembly binaries: a contract and a service.
//! Both binaries have access to the same application and chain specifi... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/log.rs | linera-sdk/src/log.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
use std::{
panic::{self, PanicHookInfo},
sync::Once,
};
use log::{LevelFilter, Log, Metadata, Record};
use crate::{
contract::wit::base_runtime_api as contract_wit, service::wit::base_runtime_api as service_wit,
};
static CONTRA... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/extensions.rs | linera-sdk/src/extensions.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Extension traits with some common functionality.
use serde::{de::DeserializeOwned, Serialize};
/// Extension trait to deserialize a type from a vector of bytes using [`bcs`].
pub trait FromBcsBytes: Sized {
/// Deserializes itself fr... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/util.rs | linera-sdk/src/util.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Module with helper types and functions used by the SDK.
use std::{
future::Future,
pin::{pin, Pin},
task::{Context, Poll},
};
use futures::task;
/// Yields the current asynchronous task so that other tasks may progress if po... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/linera_base_types.rs | linera-sdk/src/linera_base_types.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Types reexported from [`linera_base`].
pub use linera_base::{
abi::*,
crypto::*,
data_types::*,
identifiers::*,
ownership::*,
vm::{EvmInstantiation, EvmOperation, EvmQuery, VmRuntime},
BcsHexParseError,
};
| rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/graphql.rs | linera-sdk/src/graphql.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! GraphQL traits for generating interfaces into applications.
use std::sync::Arc;
/// Re-exports the derive macro for [`GraphQLMutationRoot`].
pub use linera_sdk_derive::GraphQLMutationRoot;
use crate::{Service, ServiceRuntime};
/// An o... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/service/wit.rs | linera-sdk/src/service/wit.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Internal module with code generated by [`wit-bindgen`](https://github.com/jvff/wit-bindgen).
#![allow(missing_docs)]
// Export the service interface.
wit_bindgen::generate!({
world: "service",
export_macro_name: "export_service",... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/service/test_runtime.rs | linera-sdk/src/service/test_runtime.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Runtime types to simulate interfacing with the host executing the service.
use std::{
collections::{HashMap, VecDeque},
mem,
sync::Mutex,
};
use linera_base::{
abi::ServiceAbi,
data_types::{Amount, BlockHeight, Timest... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/service/runtime.rs | linera-sdk/src/service/runtime.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Runtime types to interface with the host executing the service.
use std::sync::Mutex;
use linera_base::{
abi::ServiceAbi,
data_types::{Amount, BlockHeight, Timestamp},
http,
identifiers::{AccountOwner, ApplicationId, Chai... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/service/mod.rs | linera-sdk/src/service/mod.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Types and macros useful for writing an application service.
mod conversions_to_wit;
#[cfg(not(with_testing))]
mod runtime;
#[cfg(with_testing)]
mod test_runtime;
#[doc(hidden)]
pub mod wit;
#[cfg(not(with_testing))]
pub use self::runtime... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
linera-io/linera-protocol | https://github.com/linera-io/linera-protocol/blob/69f159d2106f7fc70870ce70074c55850bf1303b/linera-sdk/src/service/conversions_to_wit.rs | linera-sdk/src/service/conversions_to_wit.rs | // Copyright (c) Zefchain Labs, Inc.
// SPDX-License-Identifier: Apache-2.0
//! Conversions from types declared in [`linera-sdk`] to types generated by [`wit-bindgen`].
use linera_base::{crypto::CryptoHash, identifiers::ApplicationId};
use super::wit::service_runtime_api as wit_service_api;
impl From<CryptoHash> fo... | rust | Apache-2.0 | 69f159d2106f7fc70870ce70074c55850bf1303b | 2026-01-04T15:33:08.660695Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.