run and validate with
rm -f extrafield.zip && python add_unix_extra_field.py && zipinfo -v extrafield.zip
this should show
Archive: extrafield.zip
WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations. | |
NOTE: to silence this warning, add `change-id = 127866` at the top of `config.toml` | |
Building stage0 library artifacts (x86_64-unknown-linux-gnu) | |
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu) | |
Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) | |
Building stage0 tool lld-wrapper (x86_64-unknown-linux-gnu) | |
Building stage1 library artifacts (x86_64-unknown-linux-gnu) | |
Building stage0 tool compiletest (x86_64-unknown-linux-gnu) | |
Testing stage1 compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu) |
//@ needs-asm-support | |
//@ ignore-nvptx64 | |
//@ ignore-spirv | |
#![feature(asm_const)] | |
use std::arch::{asm, global_asm}; | |
// Const operands must be integers and must be constants. |
from dataclasses import dataclass | |
import tsp_python | |
from tsp_python import AsyncStore, OwnedVid, ReceivedTspMessageVariant, FlatReceivedTspMessage | |
class ReceivedTspMessage: | |
@staticmethod | |
def from_flat(msg: FlatReceivedTspMessage): | |
match msg.variant: | |
case ReceivedTspMessageVariant.GenericMessage: |
pub fn decode2(buf: &[u8], size_max: usize, num: &mut u64) -> usize { | |
let number = unsafe { core::ptr::read_unaligned(buf.as_ptr().cast()) }; | |
let bits = unsafe { core::arch::x86_64::_pext_u64(number, 0x7F7F_7F7F_7F7F_7F7Fu64) }; | |
let bytes_used = (number & !0x7F7F_7F7F_7F7F_7F7Fu64).count_ones(); | |
*num = bits | (buf[8] as u64) << 56; | |
(size_max > 0) as usize + bytes_used as usize | |
} |
run and validate with
rm -f extrafield.zip && python add_unix_extra_field.py && zipinfo -v extrafield.zip
this should show
Archive: extrafield.zip
// compile with | |
// | |
// $ clang -shared -o libcrc32.so -Wall -Werror -fpic -march=native -O3 crc32.c | |
// | |
// This command only works on x86_64 systems that support the pclmulqdq instruction. | |
#include <immintrin.h> | |
#include <wmmintrin.h> | |
#include <smmintrin.h> // _mm_extract_epi32 | |
#include <inttypes.h> | |
#include <stdio.h> |
app "brainroc" | |
packages { | |
pf: "https://github.com/roc-lang/basic-cli/releases/download/0.3.2/tE4xS_zLdmmxmHwHih9kHWQ7fsXtJr7W7h3425-eZFk.tar.br", | |
} | |
imports [ | |
pf.File, | |
pf.Path, | |
pf.Stdout, | |
pf.Task, | |
] |
app "brainroc" | |
packages { | |
pf: "https://github.com/roc-lang/basic-cli/releases/download/0.3.2/tE4xS_zLdmmxmHwHih9kHWQ7fsXtJr7W7h3425-eZFk.tar.br", | |
} | |
imports [ | |
pf.File, | |
pf.Path, | |
pf.Stdout, | |
pf.Task, | |
] |
use std::net::SocketAddr; | |
use std::os::unix::io::AsRawFd; | |
use std::thread; | |
use mio::net::UdpSocket; | |
use mio::{Events, Interest, Poll, Token}; | |
const SOCKET_TOKEN: Token = Token(0); | |
fn main() { |