Requires rustc and llvm-cbe.
rustc hello-world-no_std.rs -O --emit=llvm-ir -C panic=abort -o hello-world-no_std-O.llllvm-cbe ../testfiles/hello-world-no_std-O.ll
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| void main(int argc, char **argv) | |
| { | |
| char *secret = strdup(argv[1]); | |
| printf("I have a secret! It is located at %p and is %zu bytes long!\n", secret, strlen(secret)); | |
| while (1) {} | |
| free(secret); |
| use sdl2::video::{GLContext, GLProfile, Window}; | |
| use sdl2::{EventPump, VideoSubsystem}; | |
| use std::time::Instant; | |
| fn make_big_gl() -> (u32, u32, Vec<u8>) { | |
| let small_gl_data = b"\ | |
| 00GGGG00L0000000\ | |
| 0G0000G0L0000000\ | |
| G0000000L0000000\ | |
| G0000000L0000000\ |
| #version 300 es | |
| precision mediump float; | |
| precision mediump sampler2D; | |
| precision mediump sampler3D; | |
| vec4 textureFlipped(sampler2D s, vec2 coords) { | |
| return texture(s, vec2(coords.x, 1.0 - coords.y)); | |
| } | |
| vec4 textureFlipped(sampler3D s, vec3 coords) { |
| use sdl2::video::{GLContext, GLProfile, Window}; | |
| use sdl2::{EventPump, VideoSubsystem}; | |
| use std::time::Instant; | |
| fn test_opengl( | |
| video_ctx: &VideoSubsystem, | |
| window: &Window, | |
| gl_ctx: &GLContext, | |
| color: (f32, f32, f32, f32), | |
| ) { |
Requires rustc and llvm-cbe.
rustc hello-world-no_std.rs -O --emit=llvm-ir -C panic=abort -o hello-world-no_std-O.llllvm-cbe ../testfiles/hello-world-no_std-O.ll| # as of python 3.9 | |
| all_encodings = ['ascii', 'big5', 'big5hkscs', 'cp037', 'cp273', 'cp424', 'cp437', 'cp500', 'cp720', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp858', 'cp860', 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', 'cp869', 'cp874', 'cp875', 'cp932', 'cp949', 'cp950', 'cp1006', 'cp1026', 'cp1125', 'cp1140', 'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255', 'cp1256', 'cp1257', 'cp1258', 'euc_jp', 'euc_jis_2004', 'euc_jisx0213', 'euc_kr', 'gb2312', 'gbk', 'gb18030', 'hz', 'iso2022_jp', 'iso2022_jp_1', 'iso2022_jp_2', 'iso2022_jp_2004', 'iso2022_jp_3', 'iso2022_jp_ext', 'iso2022_kr', 'latin_1', 'iso8859_2', 'iso8859_3', 'iso8859_4', 'iso8859_5', 'iso8859_6', 'iso8859_7', 'iso8859_8', 'iso8859_9', 'iso8859_10', 'iso8859_11', 'iso8859_13', 'iso8859_14', 'iso8859_15', 'iso8859_16', 'johab', 'koi8_r', 'koi8_t', 'koi8_u', 'kz1048', 'mac_cyrillic', 'mac_greek', 'mac_iceland', 'mac_latin2', 'mac_roman', 'mac_turkish', 'ptcp154', 'shift_jis', 'shift_jis_2004', 'shift_jis |
| #include "who-needs-glsl-anyway.h" | |
| #include <stdio.h> | |
| int main(void) | |
| { | |
| vec4 v = { {1.5, 2.5, 3.5, 4.5} }; | |
| printf("%f, %f, %f, %f\n", v.rg.x, v.xy.t, v.stp.z, v.w); | |
| for (int i = 3; i >= 0; i--) { | |
| printf("%f\n", v._[i]); | |
| } | |
| } |
| /* Provide Declarations */ | |
| #include <stdarg.h> | |
| #include <setjmp.h> | |
| #include <limits.h> | |
| #include <stdint.h> | |
| #include <math.h> | |
| #ifndef __cplusplus | |
| typedef unsigned char bool; | |
| #endif |
| #include <stdio.h> | |
| int main(void) | |
| { | |
| printf("hello, world\n"); | |
| } |
| / https://twitter.com/dril/status/701465049030926343 | |
| treat !a! | |
| snack 20 treats | |
| meal 3 snacks | |
| BoysDailyIntake 3 meals | |
| Treat treat | |
| Goody 1 Treat |