I hereby claim:
- I am oscartbeaumont on github.
- I am oscartbeaumont (https://keybase.io/oscartbeaumont) on keybase.
- I have a public key whose fingerprint is CBDB 575D 2701 8C5D DBD3 6A5C 6C4B AB09 FD8A E2B6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function concatArrayBuffers(chunks: Uint8Array[]): Uint8Array { | |
const result = new Uint8Array(chunks.reduce((a, c) => a + c.length, 0)); | |
let offset = 0; | |
for (const chunk of chunks) { | |
result.set(chunk, offset); | |
offset += chunk.length; | |
} | |
return result; | |
} |
[package] | |
name = "macro-test" | |
version = "0.0.0" | |
edition = "2021" | |
[dependencies] | |
macro-test-macros = { path = "./macros" } | |
serde = { version = "1.0.202", features = ["derive"] } | |
serde_json = "1.0.117" | |
specta = "1.0.5" |
[package] | |
name = "testing" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
erased-serde = "0.4.3" | |
pin-project-lite = "0.2.13" |
import { ParentProps, createContext, useContext } from "solid-js"; | |
import { SetStoreFunction, Store, createStore } from "solid-js/store"; | |
export type CacheNode = { | |
__type: string; | |
__id: string; | |
} & Record<string, unknown>; | |
const ctx = createContext<Cache>(); |
use std::fmt::Debug; | |
pub struct Request(String); | |
pub trait ContentType: 'static { | |
type Result; | |
// `None` if not matched. | |
fn exec(&self, req: &Request) -> Option<Self::Result>; | |
} |
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get -y install git curl | |
sudo snap install code --classic | |
sudo snap install node --classic | |
curl https://sh.rustup.rs -sSf | sh -s -- -y |
pub trait Function<TMarker> { | |
type Args; | |
type Result; | |
fn exec(&self, args: Self::Args) -> Self::Result; | |
} | |
// TODO: Duplicate all the impls for `FnOnce` and `FnMut` | |
// TODO: Support up to 12 args per functions. |
#![allow(non_camel_case_types)] | |
#![allow(non_snake_case)] | |
#![allow(non_upper_case_globals)] | |
use std::{ops::Deref, sync::Arc}; | |
use rspc::Router as RspcRouter; | |
use worker::*; | |
mod utils { |
use mdns_sd::{ServiceDaemon, ServiceEvent, ServiceInfo}; | |
fn main() { | |
let mdns = ServiceDaemon::new().expect("Failed to create daemon"); | |
let service_info = ServiceInfo::new( | |
&"_demo._udp.local.", | |
&"a", | |
"192.168.1.111.local.", | |
&vec!["1.1.1.1", "2.2.2.2"][..], // "192.168.1.111", // TODO: Handle multiple addrs | |
42069, |