file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
src/platform_impl/windows/util.rs | Rust | use std::{
ffi::{c_void, OsStr, OsString},
io,
iter::once,
mem,
ops::BitAnd,
os::windows::prelude::{OsStrExt, OsStringExt},
ptr,
sync::atomic::{AtomicBool, Ordering},
};
use once_cell::sync::Lazy;
use windows_sys::{
core::{HRESULT, PCWSTR},
Win32::{
Foundation::{BOOL, HI... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
src/platform_impl/windows/window.rs | Rust | #![cfg(windows_platform)]
use raw_window_handle::{
RawDisplayHandle, RawWindowHandle, Win32WindowHandle, WindowsDisplayHandle,
};
use std::{
cell::Cell,
ffi::c_void,
io, mem, panic, ptr,
sync::{mpsc::channel, Arc, Mutex, MutexGuard},
};
use windows_sys::Win32::{
Foundation::{
HINSTANCE... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
src/platform_impl/windows/window_state.rs | Rust | use crate::{
dpi::{PhysicalPosition, PhysicalSize, Size},
event::ModifiersState,
icon::Icon,
platform_impl::platform::{event_loop, util, Fullscreen},
window::{CursorIcon, Theme, WindowAttributes},
};
use std::io;
use std::sync::MutexGuard;
use windows_sys::Win32::{
Foundation::{HWND, RECT},
... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
src/window.rs | Rust | //! The [`Window`] struct and associated types.
use std::fmt;
use raw_window_handle::{
HasRawDisplayHandle, HasRawWindowHandle, RawDisplayHandle, RawWindowHandle,
};
use crate::{
dpi::{PhysicalPosition, PhysicalSize, Position, Size},
error::{ExternalError, NotSupportedError, OsError},
event_loop::Even... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
tests/send_objects.rs | Rust | #[allow(dead_code)]
fn needs_send<T: Send>() {}
#[test]
fn event_loop_proxy_send() {
#[allow(dead_code)]
fn is_send<T: 'static + Send>() {
// ensures that `winit::EventLoopProxy` implements `Send`
needs_send::<winit::event_loop::EventLoopProxy<T>>();
}
}
#[test]
fn window_send() {
// e... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
tests/serde_objects.rs | Rust | #![cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use winit::{
dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize},
event::{
ElementState, KeyboardInput, ModifiersState, MouseButton, MouseScrollDelta, TouchPhase,
VirtualKeyCode,
},
window::CursorIcon,
};
#... | wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
tests/sync_object.rs | Rust | #[allow(dead_code)]
fn needs_sync<T: Sync>() {}
#[test]
fn window_sync() {
// ensures that `winit::Window` implements `Sync`
needs_sync::<winit::window::Window>();
}
| wusyong/winit-gtk | 3 | Rust | wusyong | Wu Yuwei | ||
commitlint.config.mjs | JavaScript | export default {
extends: ["@commitlint/config-conventional"],
rules: {
"body-max-line-length": [2, "always", 300],
},
};
| wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/__init__.py | Python | """Init for Midea LAN.
integration load process:
1. component setup: `async_setup`
1.1 use `hass.services.async_register` to register service
2. config entry setup: `async_setup_entry`
2.1 forward the Config Entry to the platform `async_forward_entry_setups`
2.2 register listener `update_listener`
3. unloa... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/binary_sensor.py | Python | """Binary sensor for Midea Lan."""
from typing import cast
from homeassistant.components.binary_sensor import (
BinarySensorDeviceClass,
BinarySensorEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SENSORS, Platform
from homeassistant.core imp... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/climate.py | Python | """Midea Climate entries."""
import logging
from typing import Any, ClassVar, TypeAlias, cast
from homeassistant.components.climate import (
ATTR_HVAC_MODE,
FAN_AUTO,
FAN_HIGH,
FAN_LOW,
FAN_MEDIUM,
PRESET_AWAY,
PRESET_BOOST,
PRESET_COMFORT,
PRESET_ECO,
PRESET_NONE,
PRESET_S... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/config_flow.py | Python | """Config flow for Midea LAN.
Setup current integration and add device entry via the web UI
enable by adding `config_flow: true` in `manifest.json`
`MideaLanConfigFlow`: add device entry
`MideaLanOptionsFlowHandler`: update the options of a config entry
job process:
1. run `async_step_user` when select `Add Device` ... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/const.py | Python | """Const for Midea Lan."""
from enum import IntEnum
from homeassistant.const import Platform
DOMAIN = "midea_ac_lan"
COMPONENT = "component"
DEVICES = "devices"
CONF_KEY = "key"
CONF_MODEL = "model"
CONF_SUBTYPE = "subtype"
CONF_ACCOUNT = "account"
CONF_SERVER = "server"
CONF_REFRESH_INTERVAL = "refresh_interval"
... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/diagnostics.py | Python | """Diagnostics support for Midea AC LAN."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from homeassistant.components.diagnostics import async_redact_data
from homeassistant.const import (
CONF_TOKEN,
)
if TYPE_CHECKING:
from homeassistant.config_entries import ConfigEntry
f... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/fan.py | Python | """Midea Fan entries."""
import logging
from typing import Any, cast
from homeassistant.components.fan import FanEntity, FanEntityFeature
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_DEVICE_ID,
CONF_SWITCHES,
Platform,
)
from homeassistant.core import HomeAss... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/humidifier.py | Python | """Midea Humidifier entries."""
import logging
from typing import Any, TypeAlias, cast
from homeassistant.components.humidifier import (
HumidifierDeviceClass,
HumidifierEntity,
HumidifierEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, ... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/light.py | Python | """Midea Light entries."""
import logging
from typing import Any, cast
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP_KELVIN,
ATTR_EFFECT,
ColorMode,
LightEntity,
LightEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const ... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/lock.py | Python | """Lock entities for Midea Lan."""
from typing import Any, cast
from homeassistant.components.lock import LockEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SWITCHES, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.enti... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/midea_devices.py | Python | """Devices configuration for Midea Lan."""
from typing import Any
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
from homeassistant.const import (
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
CONCENTRATION... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/midea_entity.py | Python | """Base entity for Midea Lan."""
import logging
from typing import Any, cast
from homeassistant.const import MAJOR_VERSION, MINOR_VERSION
from homeassistant.core import callback
if (MAJOR_VERSION, MINOR_VERSION) >= (2023, 9):
from homeassistant.helpers.device_registry import DeviceInfo
else:
from homeassista... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/number.py | Python | """Number for Midea Lan."""
from typing import Any, cast
from homeassistant.components.number import NumberEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SWITCHES, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/select.py | Python | """Select for Midea Lan."""
from typing import cast
from homeassistant.components.select import SelectEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SWITCHES, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platf... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/sensor.py | Python | """Sensor for Midea Lan."""
from typing import Any, cast
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SENSORS, Platform
from homeassistant.core im... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/switch.py | Python | """Switch for Midea Lan."""
from typing import Any, cast
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_DEVICE_ID, CONF_SWITCHES, Platform
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import ToggleEntity
from homeassistant.helpers.entity_pla... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
custom_components/midea_ac_lan/water_heater.py | Python | """Midea Water Heater entries."""
import functools as ft
import logging
from typing import Any, ClassVar, TypeAlias, cast
from homeassistant.components.water_heater import (
WaterHeaterEntity,
WaterHeaterEntityFeature,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
scripts/install.sh | Shell | #!/bin/bash
#
# origin https://github.com/al-one/hass-xiaomi-miot/blob/master/install.sh
#
# wget -q -O - https://raw.githubusercontent.com/wuwentao/midea_ac_lan/master/scripts/install.sh | bash -
# wget -q -O - https://raw.githubusercontent.com/wuwentao/midea_ac_lan/master/scripts/install.sh | ARCHIVE_TAG=v0.4.2 bash ... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
scripts/mypy.sh | Shell | #!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
pyver=$(python -c 'import platform; major, minor, path = platform.python_version_tuple(); print(f"{major}.{minor}")')
mypy --config-file mypy-$pyver.ini .
| wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
scripts/run.sh | Shell | #!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
# Create config dir if not present
if [[ ! -d "${PWD}/config" ]]; then
mkdir -p "${PWD}/config"
hass --config "${PWD}/config" --script ensure_config
fi
# Set the path to custom_components
## This let's us have the structure we want <root>/custom_components/vailla... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
scripts/setup.sh | Shell | #!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
# Install pre-commit hooks on commit
pre-commit install
pre-commit install --hook-type commit-msg
npm install --no-fund @commitlint/config-conventional
# Create config dir if not present
if [[ ! -d "${PWD}/config" ]]; then
mkdir -p "${PWD}/config"
hass --config ... | wuwentao/midea_ac_lan | 1,530 | Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network. | Python | wuwentao | Hello World | |
config/dev.env.js | JavaScript | 'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
| wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
config/index.js | JavaScript | 'use strict'
// Template version: 1.2.4
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {},
// Various Dev Server settings
host: 'localhost', ... | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
config/prod.env.js | JavaScript | 'use strict'
module.exports = {
NODE_ENV: '"production"'
}
| wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
index.html | HTML | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Drawing</title>
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
<link rel="styles... | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
postcss.config.js | JavaScript | module.exports = {}; | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/App.vue | Vue | <template>
<div id="app">
<router-view/>
</div>
</template>
<script>
export default {
name: 'app'
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</style>
| wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/assets/css/MaterialIcons.css | CSS | @font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(https://pub.wangxuefeng.com.cn/code/class/css/v37/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2) format('woff2');
}
/* fallback */
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(h... | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/components/draw.vue | Vue | <template>
<div class="layout">
<div class="header">
<div class="logo">
作业批改
</div>
<div class="nav" style="position:fixed;top: 10px;">
<mu-flat-button v-for="tab in tabs" :key="tab.name" :label="tab.name" class="tab demo-flat-button" :icon="tab.icon" @click="tabfun(t... | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/main.js | JavaScript | // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MuseUI from 'muse-ui'
import 'muse-ui/dist/muse-ui.css'
Vue.use(MuseUI)
Vue.config.productionTip... | wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/router/index.js | JavaScript | import Vue from 'vue'
import Router from 'vue-router'
import draw from '@/components/draw'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'draw',
component: draw
}
]
})
| wwenj/Canvas-Drawing-board | 3 | 一个vue-cli2.+搭建的基于canvas的画板 | Vue | wwenj | zu | 贝壳找房 |
src/cloudflare.rs | Rust | use std::time::Duration;
use anyhow::Result;
use serde::{de::DeserializeOwned, Deserialize, Serialize};
#[derive(Debug)]
pub struct CloudflareClient {
http_client: reqwest::blocking::Client,
token: String,
}
#[derive(Debug, Clone, Deserialize)]
pub struct DnsRecord {
pub id: String,
pub content: Stri... | xJonathanLEI/cfdydns | 0 | Cloudflare dynamic DNS client | Rust | xJonathanLEI | Jonathan LEI | |
src/main.rs | Rust | use std::{
thread::sleep,
time::{Duration, SystemTime},
};
use anyhow::Result;
use clap::Parser;
use colored::Colorize;
use log::{debug, error, info, trace};
mod cloudflare;
use cloudflare::CloudflareClient;
const COMMENT: &str = "Maintained by cfdydns";
#[derive(Debug, Parser)]
#[clap(about)]
struct Cli {
... | xJonathanLEI/cfdydns | 0 | Cloudflare dynamic DNS client | Rust | xJonathanLEI | Jonathan LEI | |
src/lib.rs | Rust | //! Speculos client written in Rust for Ledger integration testing.
#![deny(missing_docs)]
use std::{
borrow::Cow,
error::Error,
fmt::Display,
io::{BufRead, BufReader},
path::Path,
process::{Child, Command, Stdio},
time::Duration,
};
use reqwest::{Client, ClientBuilder};
use serde::{Deser... | xJonathanLEI/speculos-client | 0 | Speculos client written in Rust for Ledger integration testing | Rust | xJonathanLEI | Jonathan LEI | |
src/cli.rs | Rust | use clap::{builder::TypedValueParser, error::ErrorKind, Arg, Command, Error};
use url::Url;
#[derive(Debug, Clone)]
pub enum UpstreamSpec {
Raw(Url),
Dns(DnsSpec),
}
#[derive(Debug, Clone)]
pub struct DnsSpec {
pub host_port: String,
pub path: String,
}
#[derive(Clone)]
pub struct UpstreamSpecParser;... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/head.rs | Rust | use std::cmp::Ordering;
#[derive(Debug, Clone, Copy)]
pub enum ChainHead {
Confirmed(ConfirmedHead),
Pending(PendingHead),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ConfirmedHead {
pub height: u64,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct PendingHead {
pub height: u64... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/load_balancer.rs | Rust | use anyhow::Result;
use reqwest::Client;
use crate::upstream_store::UpstreamStore;
pub struct LoadBalancer {
store: UpstreamStore,
http_client: Client,
}
impl LoadBalancer {
pub fn new(store: UpstreamStore) -> Self {
Self {
store,
http_client: Client::new(),
}
... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/main.rs | Rust | use std::{sync::Arc, time::Duration};
use anyhow::Result;
use axum::{extract::State, response::IntoResponse, routing::post, Router};
use clap::Parser;
mod cli;
use cli::{UpstreamSpec, UpstreamSpecParser};
mod head;
mod load_balancer;
use load_balancer::LoadBalancer;
mod upstream_resolver;
mod upstream_store;
use ... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/shutdown.rs | Rust | use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
use tokio_util::sync::CancellationToken;
pub struct ShutdownHandle {
cancel_signal: CancellationToken,
finish_handle: UnboundedReceiver<()>,
}
pub struct FinishSignal {
sender: UnboundedSender<()>,
}
impl ShutdownHandle {
pub fn new() -> (S... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/upstream_resolver.rs | Rust | use std::time::Duration;
use anyhow::Result;
use tokio::{net::lookup_host, sync::mpsc::UnboundedSender};
use url::Url;
use crate::{
cli::UpstreamSpec,
shutdown::ShutdownHandle,
upstream_store::{UpstreamId, UpstreamResolvedEvent, UpstreamStoreManagerEvent},
};
const RESOLVER_POLL_INTERVAL: Duration = Dura... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/upstream_store.rs | Rust | use std::{collections::HashMap, iter::once, sync::Arc};
use anyhow::Result;
use arc_swap::ArcSwap;
use rand::{thread_rng, Rng};
use tokio::sync::mpsc::{UnboundedReceiver, UnboundedSender};
use url::Url;
use crate::{
cli::UpstreamSpec,
head::ChainHead,
shutdown::{FinishSignal, ShutdownHandle},
upstream... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
src/upstream_tracker.rs | Rust | use std::{sync::Arc, time::Duration};
use anyhow::Result;
use arc_swap::ArcSwap;
use starknet::{
core::types::{BlockId, BlockTag, MaybePendingBlockWithTxHashes},
providers::{jsonrpc::HttpTransport, JsonRpcClient, Provider},
};
use tokio::sync::mpsc::UnboundedSender;
use url::Url;
use crate::{
head::{Chain... | xJonathanLEI/starknet-lb | 4 | Pending block-aware Starknet-native RPC load balancer | Rust | xJonathanLEI | Jonathan LEI | |
scripts/build_bench_wasm.sh | Shell | #!/usr/bin/env bash
# Make sure `wasm32-wasi` target and `cargo-wasi` are installed
set -e
function generate_wasm() {
cargo wasi build --bench=$1 --release
cp $(ls -t $REPO_ROOT/target/wasm32-wasi/release/deps/$1*.rustc.wasm | head -n 1) $REPO_ROOT/target/bench-wasm/$1.wasm
}
SCRIPT_DIR=$( cd -- "$( dirname -- ... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
scripts/run_bench_wasm.sh | Shell | #!/usr/bin/env bash
# Build benchmark wasm artifacts with `build_bench_wasm.sh` first
set -e
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
REPO_ROOT=$( dirname -- $SCRIPT_DIR )
RUNTIME="$1"
if [ -z "$RUNTIME" ]; then
echo "Runtime not specified"
exit 1
fi
benches=(
compute_... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-codegen/src/lib.rs | Rust | use std::fmt::Write;
use proc_macro::TokenStream;
use ruint::aliases::U256;
use sha2::{Digest, Sha256};
use veedo_ff::{FieldElement, PRIME};
const N_STATE: u64 = 2;
const N_COLS: u64 = 10;
const LENGTH: u64 = 256;
const FIELD_ELEMENT: &str = "::veedo_ff::FieldElement";
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
e... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/benches/compute_100k_iterations.rs | Rust | use criterion::{black_box, criterion_group, criterion_main, Criterion};
use veedo_core::compute_delay_function;
pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("compute_100k_iterations", |b| {
b.iter(|| {
black_box(compute_delay_function(100_000, 1, 1));
});
});
}
... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/benches/inverse_100k_iterations.rs | Rust | use criterion::{black_box, criterion_group, criterion_main, Criterion};
use veedo_core::inverse_delay_function;
pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("inverse_100k_iterations", |b| {
b.iter(|| {
black_box(inverse_delay_function(
100_000,
... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/src/compute_multi_thread.rs | Rust | use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering};
use veedo_ff::{BigInteger128, FieldElement};
use crate::{
constants::{MDS_MATRIX, ROUND_CONSTANTS},
utils::cube_root,
};
/// The computation thread state that's shared between the 2 worker threads.
///
/// Two slots are used as it's possible for one ... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/src/compute_single_thread.rs | Rust | use veedo_ff::FieldElement;
use crate::constants::{MDS_MATRIX_INVERSE, ROUND_CONSTANTS};
#[cfg(target_arch = "wasm32")]
pub fn compute_delay_function(n_iters: usize, x: u128, y: u128) -> (FieldElement, FieldElement) {
use crate::{constants::MDS_MATRIX, utils::cube_root};
let (mut x, mut y) = (FieldElement::f... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/src/constants.rs | Rust | veedo_codegen::round_constants!();
veedo_codegen::mds_matrix!();
| xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/src/lib.rs | Rust | mod constants;
mod utils;
#[cfg(not(target_arch = "wasm32"))]
mod compute_multi_thread;
mod compute_single_thread;
#[cfg(not(target_arch = "wasm32"))]
pub use compute_multi_thread::compute_delay_function;
#[cfg(target_arch = "wasm32")]
pub use compute_single_thread::compute_delay_function;
// The inverse function is... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-core/src/utils.rs | Rust | use veedo_ff::Field;
veedo_codegen::fn_cube_root!();
| xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
veedo-ff/src/lib.rs | Rust | use ark_ff::fields::{Fp128, MontBackend, MontConfig};
pub use ark_ff::{BigInteger128, BitIteratorBE, Field};
pub const PRIME: u128 = 0x30000003000000010000000000000001;
#[derive(MontConfig)]
#[modulus = "63802944035360449460622495747797942273"]
#[generator = "3"]
pub struct FrConfig;
pub type FieldElement = Fp128<M... | xJonathanLEI/veedo-rs | 2 | Rust implementation of VeeDo, a STARK-based Verifiable Delay Function | Rust | xJonathanLEI | Jonathan LEI | |
benches/cs.rs | Rust | use criterion::{criterion_group, criterion_main, Criterion};
use std::sync::Mutex;
use std::sync::Barrier;
const THREADS: usize = 8;
const ITER: usize = 2000;
static BARRIER: Barrier = Barrier::new(THREADS+1);
static MUTEX: Mutex<usize> = Mutex::new(0);
static PARKING_LOT_MUTEX: parking_lot::Mutex<usize> = parking_lo... | xacrimon/bcs | 0 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/lib.rs | Rust | use std::cell::UnsafeCell;
use std::hint;
use std::marker::PhantomData;
use std::mem::{ManuallyDrop};
use std::pin::pin;
use std::ptr::{self, NonNull};
use std::sync::atomic::{self, AtomicBool, AtomicPtr, Ordering};
use std::thread::{self, Thread};
thread_local! {
static TOKEN: AtomicBool = const { AtomicBool::new... | xacrimon/bcs | 0 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
derive/src/lib.rs | Rust | use proc_macro2::{Span, TokenStream};
use quote::{ToTokens, quote, quote_spanned};
use syn::{
parse::{Parse, ParseStream},
spanned::Spanned,
visit_mut::VisitMut,
};
use synstructure::{AddBounds, decl_derive};
fn collect_derive(s: synstructure::Structure) -> TokenStream {
fn find_collect_meta(attrs: &[s... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/allocator_api.rs | Rust | use core::{alloc::Layout, marker::PhantomData, ptr::NonNull};
use std::alloc::{AllocError, Allocator, Global};
use crate::dmm::{collect::Collect, context::Mutation, metrics::Metrics, types::Invariant};
#[derive(Clone)]
pub struct MetricsAlloc<'gc, A = Global> {
metrics: Metrics,
allocator: A,
_marker: In... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/arena.rs | Rust | use core::marker::PhantomData;
use std::boxed::Box;
use crate::dmm::{
Collect,
context::{Context, Finalization, Mutation, Phase, RunUntil, Stop},
metrics::Metrics,
};
/// A trait that produces a [`Collect`]-able type for the given lifetime. This is used to produce
/// the root [`Collect`] instance in an [... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/barrier.rs | Rust | //! Write barrier management.
use core::borrow::Borrow;
use core::mem;
use core::ops::{
Deref, DerefMut, Index, Range, RangeFrom, RangeInclusive, RangeTo, RangeToInclusive,
};
use std::collections::{BTreeMap, VecDeque};
use std::vec::Vec;
use std::{collections::HashMap, hash::BuildHasher, hash::Hash};
#[cfg(doc... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/collect.rs | Rust | use crate::dmm::{Gc, GcWeak};
pub use tcvm_derive::Collect;
/// A trait for garbage collected objects that can be placed into `Gc` pointers. This trait is
/// unsafe, because `Gc` pointers inside an Arena are assumed never to be dangling, and in order to
/// ensure this certain rules must be followed:
///
/// 1. `C... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/collect_impl.rs | Rust | use core::cell::{Cell, RefCell};
use core::marker::PhantomData;
use std::boxed::Box;
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, LinkedList, VecDeque};
use std::collections::{HashMap, HashSet};
use std::rc::Rc;
use std::string::String;
use std::vec::Vec;
use crate::dmm::collect::{Collect, Trace};
/// If a ... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/context.rs | Rust | use core::{
cell::{Cell, UnsafeCell},
mem,
ops::{ControlFlow, Deref, DerefMut},
ptr::NonNull,
};
use std::{boxed::Box, vec::Vec};
use crate::dmm::{
Gc, GcWeak,
collect::{Collect, Trace},
metrics::Metrics,
types::{GcBox, GcBoxHeader, GcBoxInner, GcColor, Invariant},
};
/// Handle value ... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/dynamic_roots.rs | Rust | use core::{cell::RefCell, fmt, mem};
use std::{
rc::{Rc, Weak},
vec::Vec,
};
use crate::dmm::{
Gc, Mutation, Rootable,
arena::Root,
collect::{Collect, Trace},
metrics::Metrics,
};
/// A way of registering GC roots dynamically.
///
/// Use this type as (a part of) an [`Arena`](crate::Arena) ro... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/gc.rs | Rust | use core::{
alloc::Layout,
borrow::Borrow,
fmt::{self, Debug, Display, Pointer},
hash::{Hash, Hasher},
marker::PhantomData,
ops::Deref,
ptr::NonNull,
};
use crate::dmm::{
Finalization,
barrier::{Unlock, Write},
collect::{Collect, Trace},
context::Mutation,
gc_weak::GcWea... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/gc_weak.rs | Rust | use crate::dmm::Mutation;
use crate::dmm::collect::{Collect, Trace};
use crate::dmm::context::Finalization;
use crate::dmm::gc::Gc;
use crate::dmm::types::GcBox;
use core::fmt::{self, Debug};
pub struct GcWeak<'gc, T: ?Sized + 'gc> {
pub(crate) inner: Gc<'gc, T>,
}
impl<'gc, T: ?Sized + 'gc> Copy for GcWeak<'gc,... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/hashbrown.rs | Rust | mod inner {
use core::hash::{BuildHasher, Hash};
use std::alloc::Allocator;
use crate::dmm::barrier::IndexWrite;
use crate::dmm::collect::{Collect, Trace};
unsafe impl<'gc, K, V, S, A> Collect<'gc> for hashbrown::HashMap<K, V, S, A>
where
K: Collect<'gc>,
V: Collect<'gc>,
... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/lock.rs | Rust | //! GC-aware interior mutability types.
use core::{
cell::{BorrowError, BorrowMutError, Cell, OnceCell, Ref, RefCell, RefMut},
cmp::Ordering,
fmt,
};
use crate::dmm::{
Gc, Mutation,
barrier::Unlock,
collect::{Collect, Trace},
};
// Helper macro to factor out the common parts of locks types.
m... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/metrics.rs | Rust | use core::cell::Cell;
use std::rc::Rc;
/// Tuning parameters for a given garbage collected [`crate::Arena`].
///
/// Any allocation that occurs during a collection cycle will incur "debt" that is exactly equal to
/// the allocated bytes. This "debt" is paid off by running the collection algorithm some amount of
/// ti... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/mod.rs | Rust | #![cfg_attr(miri, feature(strict_provenance))]
pub mod arena;
pub mod barrier;
pub mod collect;
mod collect_impl;
mod context;
pub mod dynamic_roots;
mod gc;
mod gc_weak;
pub mod lock;
pub mod metrics;
mod no_drop;
mod static_collect;
mod types;
mod unsize;
pub mod allocator_api;
mod hashbrown;
#[doc(hidden)]
pub u... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/no_drop.rs | Rust | // Trait that is automatically implemented for all types that implement `Drop`.
//
// Used to cause a conflicting trait impl if a type implements `Drop` to forbid implementing `Drop`.
#[doc(hidden)]
pub trait __MustNotImplDrop {}
#[allow(drop_bounds)]
impl<T: Drop> __MustNotImplDrop for T {}
| xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/static_collect.rs | Rust | use crate::dmm::Rootable;
use crate::dmm::collect::Collect;
use core::convert::{AsMut, AsRef};
use core::ops::{Deref, DerefMut};
use std::borrow::{Borrow, BorrowMut};
/// A wrapper type that implements Collect whenever the contained T is 'static, which is useful in
/// generic contexts
#[derive(Debug, Copy, Clone, Eq... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/types.rs | Rust | use core::alloc::Layout;
use core::cell::Cell;
use core::marker::PhantomData;
use core::ptr::NonNull;
use core::{mem, ptr};
use crate::dmm::{collect::Collect, context::Context};
/// A thin-pointer-sized box containing a type-erased GC object.
/// Stores the metadata required by the GC algorithm inline (see `GcBoxInne... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/dmm/unsize.rs | Rust | use core::marker::PhantomData;
use core::ptr::NonNull;
use crate::dmm::{
types::GcBoxInner,
{Gc, GcWeak},
};
/// Unsizes a [`Gc`] or [`GcWeak`] pointer.
///
/// This macro is a `gc_arena`-specific replacement for the nightly-only `CoerceUnsized` trait.
///
/// ## Usage
///
/// ```rust
/// # use std::fmt::Disp... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/instruction.rs | Rust | type Register = u8;
type UpvalueIndex = u8;
type ConstantIndex = u16;
#[derive(Debug, Clone, Copy)]
#[repr(u8)]
#[repr(align(8))]
pub enum Instruction {
MOVE {
dst: Register,
src: Register,
},
LOAD {
dst: Register,
idx: ConstantIndex,
},
LFALSESKIP {
src: R... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/lib.rs | Rust | #![allow(incomplete_features)]
#![feature(explicit_tail_calls)]
#![feature(macro_metavar_expr)]
#![feature(likely_unlikely)]
#![feature(allocator_api)]
pub mod dmm;
mod instruction;
mod parser;
mod vm;
pub mod env;
| xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/parser/lexer.rs | Rust | pub struct Lexer<'source> {
source: &'source str,
}
| xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/parser/mod.rs | Rust | mod lexer;
mod token;
| xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/parser/token.rs | Rust | pub enum Token {
And,
Break,
Do,
Else,
ElseIf,
End,
False,
For,
Function,
Global,
Goto,
If,
In,
Local,
Nil,
Not,
Or,
Repeat,
Return,
Then,
True,
Until,
While,
Add,
Sub,
Mul,
Div,
Mod,
Pow,
Len,
B... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/vm/interp.rs | Rust | use crate::instruction::Instruction;
use crate::vm::num::{self, op_arith, op_bit};
use crate::env::Value;
const HANDLERS: &[Handler] = &[
op_move,
op_load,
op_lfalseskip,
op_getupval,
op_setupval,
op_gettabup,
op_settabup,
op_gettable,
op_settable,
op_newtable,
op_add,
o... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/vm/mod.rs | Rust | mod interp;
mod num;
| xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
src/vm/num.rs | Rust | use crate::env::Value;
fn exact_float_to_int(f: f64) -> Option<i64> {
if !f.is_finite() {
return None;
}
const MIN: i64 = -(2<<53 - 1);
const MAX: i64 = 2<<53 - 1;
if f < MIN as f64 || f > MAX as f64 {
return None;
}
if f.trunc() != f {
return None;
}
let... | xacrimon/tcvm | 7 | Rust | xacrimon | Joel Wejdenstål | linköping university | |
checkstyle.py | Python | #!/usr/bin/python
import fnmatch
import sys
import subprocess
def git_get_staged_files():
files = str(subprocess.check_output(['git', 'diff', '--name-only', '--cached']))
return [line for line in files.splitlines() if line != '']
def git_get_all_files():
files = str(subprocess.check_output(['git', 'ls-files'])... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
client.sh | Shell | #!/bin/sh
cd bin
export LD_LIBRARY_PATH=`pwd`
cd ..
./bin/sample-client
| xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
cpplint.py | Python | #!/usr/bin/python
#
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of ... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/base/macros.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_BASE_MACROS_HPP_
#define ENET_PLUS_BASE_MACROS_HPP_
#include <cstdio>
#include <cstdlib>
// The CHECK() macro is used for checking assertions, and will cause
// an immediate crash if its assertion is not met. DCHECK() is like
// CHECK() but is only compiled in... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/base/pstdint.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_BASE_PSTDINT_HPP_
#define ENET_PLUS_BASE_PSTDINT_HPP_
#include "enet-plus/base/macros.h"
#define __STDC_LIMIT_MACROS
#include <stdint.h>
typedef float float32_t;
typedef double float64_t;
SCHECK(sizeof(uint8_t) == 1);
SCHECK(sizeof(uint16_t) == 2);
SCHECK(si... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/client_host.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_CLIENT_HOST_HPP_
#define ENET_PLUS_CLIENT_HOST_HPP_
#include <string>
#include "enet-plus/base/macros.h"
#include "enet-plus/base/pstdint.h"
#include "enet-plus/host.h"
#include "enet-plus/dll.h"
struct _ENetHost;
namespace enet {
class Enet;
class Event;... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/dll.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_DLL_HPP_
#define ENET_PLUS_DLL_HPP_
#ifdef _MSC_VER
#ifdef ENET_PLUS_DLL
#define ENET_PLUS_DECL __declspec(dllexport)
#else
#define ENET_PLUS_DECL __declspec(dllimport)
#endif
#else
#define ENET_PLUS_DECL
#endif
#endif // ENET_PLUS_DLL_HPP_
| xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/enet.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_ENET_HPP_
#define ENET_PLUS_ENET_HPP_
#include "enet-plus/base/macros.h"
#include "enet-plus/base/pstdint.h"
#include "enet-plus/host.h"
#include "enet-plus/server_host.h"
#include "enet-plus/client_host.h"
#include "enet-plus/event.h"
#include "enet-plus/peer... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/event.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_EVENT_HPP_
#define ENET_PLUS_EVENT_HPP_
#include <string>
#include <vector>
#include "enet-plus/base/macros.h"
#include "enet-plus/base/pstdint.h"
#include "enet-plus/dll.h"
struct _ENetEvent;
namespace enet {
class Enet;
class Host;
class Peer;
// 'Event... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/host.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_HOST_HPP_
#define ENET_PLUS_HOST_HPP_
#include <map>
#include <string>
#include "enet-plus/base/macros.h"
#include "enet-plus/base/pstdint.h"
#include "enet-plus/dll.h"
struct _ENetHost;
struct _ENetPeer;
namespace enet {
class Enet;
class Event;
class Pee... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov | |
include/enet-plus/peer.h | C/C++ Header | // Copyright (c) 2013 Andrey Konovalov
#ifndef ENET_PLUS_PEER_HPP_
#define ENET_PLUS_PEER_HPP_
#include <string>
#include "enet-plus/base/macros.h"
#include "enet-plus/base/pstdint.h"
#include "enet-plus/dll.h"
struct _ENetPeer;
namespace enet {
class Enet;
class ClientHost;
// 'Peer' represents a remote transm... | xairy/enet-plus | 4 | C++ wrapper for ENet | Python | xairy | Andrey Konovalov |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.