briansmith / ring

Safe, fast, small crypto using Rust
Other
3.68k stars 693 forks source link

(This is how you) Support the Nintendo 3DS #1951

Open AlexBigCheese opened 6 months ago

AlexBigCheese commented 6 months ago

in build.rs you'll want

AsmTarget {
        oss: &["horizon"],
        arch: ARM,
        perlasm_format: "linux32",
        asm_extension: "S",
        preassemble: false
    },

and you'll want to add horizon to the src/rand.rs:135

environment variables that seem to make it work:

export DEVKITPRO=/opt/devkitpro/
export DEVKITARM=/opt/devkitpro/devkitARM/
export TARGET_CC=/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc
export CFLAGS_armv6k_nintendo_3ds="-march=armv6k -mfloat-abi=hard -finline-limit=100000"
export CC=/opt/devkitpro/devkitARM/bin/arm-none-eabi-gcc

This enables you to use minreq to make https requests on the 3DS!