├── .gitignore ├── roms ├── hello.rom ├── hello-line.rom ├── hello-pixel.rom ├── heello-pixels.rom ├── hello-pixels.rom ├── hello-sprite.rom ├── hello-sprites.rom ├── hello-keyboard.rom ├── draw-with-keyboard.rom ├── hello-2bpp-sprite.rom ├── hello.tal ├── hello-pixel.tal ├── hello-sprite.tal ├── hello-line.tal ├── hello-pixels.tal ├── hello-sprites.tal ├── hello-2bpp-sprite.tal ├── hello-keyboard.tal └── draw-with-keyboard.tal ├── EresmaSprites.png ├── EresmaSprites2.png ├── Cargo.toml ├── .github └── workflows │ └── test.yml ├── README.md ├── src ├── stack.rs ├── devices.rs └── main.rs ├── uxnasm.c └── Cargo.lock /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /roms/hello.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello.rom -------------------------------------------------------------------------------- /EresmaSprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/EresmaSprites.png -------------------------------------------------------------------------------- /EresmaSprites2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/EresmaSprites2.png -------------------------------------------------------------------------------- /roms/hello-line.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-line.rom -------------------------------------------------------------------------------- /roms/hello-pixel.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-pixel.rom -------------------------------------------------------------------------------- /roms/heello-pixels.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/heello-pixels.rom -------------------------------------------------------------------------------- /roms/hello-pixels.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-pixels.rom -------------------------------------------------------------------------------- /roms/hello-sprite.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-sprite.rom -------------------------------------------------------------------------------- /roms/hello-sprites.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-sprites.rom -------------------------------------------------------------------------------- /roms/hello-keyboard.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-keyboard.rom -------------------------------------------------------------------------------- /roms/draw-with-keyboard.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/draw-with-keyboard.rom -------------------------------------------------------------------------------- /roms/hello-2bpp-sprite.rom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aarroyoc/eresma/master/roms/hello-2bpp-sprite.rom -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "eresma" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | ggez = "0.8.0" 10 | num_enum = "0.5.7" 11 | -------------------------------------------------------------------------------- /roms/hello.tal: -------------------------------------------------------------------------------- 1 | ( hello.tal ) 2 | ( devices ) 3 | |10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] 4 | 5 | ( macros ) 6 | ( print a character to standard output ) 7 | %EMIT { .Console/write DEO } ( character -- ) 8 | ( print a newline ) 9 | %NL { #0a EMIT } ( -- ) 10 | 11 | ( main program ) 12 | |0100 LIT 'h EMIT 13 | LIT 'e EMIT 14 | LIT 'l EMIT 15 | LIT 'l EMIT 16 | LIT 'o EMIT 17 | NL -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | push: 5 | branches: [ "master" ] 6 | pull_request: 7 | branches: [ "master" ] 8 | 9 | env: 10 | CARGO_TERM_COLOR: always 11 | 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-22.04 16 | 17 | steps: 18 | - uses: actions/checkout@v3 19 | - name: Install APT dependencies 20 | run: sudo apt-get install libasound2-dev libudev-dev 21 | - name: Build 22 | run: cargo build --verbose 23 | - name: Run tests 24 | run: cargo test --verbose 25 | -------------------------------------------------------------------------------- /roms/hello-pixel.tal: -------------------------------------------------------------------------------- 1 | ( hello-pixel.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( main program ) 8 | |0100 9 | ( set system colors ) 10 | #2ce9 .System/r DEO2 11 | #01c0 .System/g DEO2 12 | #2ce5 .System/b DEO2 13 | 14 | ( draw a pixel in the screen ) 15 | #0008 .Screen/x DEO2 16 | #0008 .Screen/y DEO2 17 | #41 .Screen/pixel DEO ( fg layer, color 1 ) -------------------------------------------------------------------------------- /roms/hello-sprite.tal: -------------------------------------------------------------------------------- 1 | ( hello-sprite.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( main program ) 8 | |0100 9 | ( set system colors ) 10 | #2ce9 .System/r DEO2 11 | #01c0 .System/g DEO2 12 | #2ce5 .System/b DEO2 13 | 14 | ( set x,y coordinates ) 15 | #0008 .Screen/x DEO2 16 | #0008 .Screen/y DEO2 17 | 18 | ( set sprite address ) 19 | ;square .Screen/addr DEO2 20 | 21 | ( draw sprite in the background ) 22 | ( using color 1 for the outline ) 23 | #01 .Screen/sprite DEO 24 | 25 | BRK 26 | 27 | @square ff81 8181 8181 81ff -------------------------------------------------------------------------------- /roms/hello-line.tal: -------------------------------------------------------------------------------- 1 | ( hello-line.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( init ) 8 | |0100 9 | ( set system colors ) 10 | #2ce9 .System/r DEO2 11 | #01c0 .System/g DEO2 12 | #2ce5 .System/b DEO2 13 | 14 | ( set initial x,y coordinates ) 15 | #0008 .Screen/x DEO2 16 | #0008 .Screen/y DEO2 17 | 18 | ( set screen vector ) 19 | ;on-frame .Screen/vector DEO2 20 | BRK 21 | 22 | @on-frame ( -> ) 23 | ( draw a pixel in the bg with color 1 ) 24 | #01 .Screen/pixel DEO 25 | 26 | ( increment Screen/x ) 27 | .Screen/x DEI2 INC2 .Screen/x DEO2 28 | BRK -------------------------------------------------------------------------------- /roms/hello-pixels.tal: -------------------------------------------------------------------------------- 1 | ( hello-pixels.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( macros ) 8 | %DRAW-PIXEL { #41 .Screen/pixel DEO } ( -- ) 9 | %INC-X { .Screen/x DEI2 INC2 .Screen/x DEO2 } ( -- ) 10 | 11 | ( main program ) 12 | |0100 13 | #2ce9 .System/r DEO2 14 | #01c0 .System/g DEO2 15 | #2ce5 .System/b DEO2 16 | 17 | ( set initial x,y coordinates ) 18 | #0008 .Screen/x DEO2 19 | #0008 .Screen/y DEO2 20 | 21 | ( draw 6 pixels in an horizontal line ) 22 | DRAW-PIXEL INC-X 23 | DRAW-PIXEL INC-X 24 | DRAW-PIXEL INC-X 25 | DRAW-PIXEL INC-X 26 | DRAW-PIXEL INC-X 27 | DRAW-PIXEL -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Eresma - An UXN / Varvara computer 2 | 3 | ![Eresma image](EresmaSprites2.png) 4 | 5 | ** Eresma is at alpha stage ** 6 | 7 | Eresma is a fantasy computer using the UXN instruction set and it's compatible with the devices of a Varvara computer. 8 | 9 | ## How to use it? 10 | 11 | Compile your Uxntal programs using a UNX assembler. unxasm.c is included here if you want to use it: 12 | 13 | ``` 14 | gcc -o unxasm unxasm.c 15 | ./unxasm 16 | ``` 17 | 18 | Load your ROM files: 19 | 20 | ``` 21 | cargo run -- 22 | ``` 23 | 24 | Some ROMs are already included. For example: 25 | 26 | ``` 27 | cargo run -- roms/hello-sprites.rom 28 | ``` 29 | 30 | yields: 31 | 32 | ![hello-sprites.rom output](EresmaSprites.png) 33 | 34 | 35 | ## Learn more about UXN 36 | 37 | * [Uxntal homepage](https://wiki.xxiivv.com/site/uxntal.html) 38 | * [Uxntal reference](https://wiki.xxiivv.com/site/uxntal_reference.html) 39 | * [Varvara reference](https://wiki.xxiivv.com/site/varvara.html) 40 | * [Compudanzas tutorial](https://compudanzas.net/uxn_tutorial.html) -------------------------------------------------------------------------------- /roms/hello-sprites.tal: -------------------------------------------------------------------------------- 1 | ( hello-sprites.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( macros ) 8 | %INIT-X { #0008 .Screen/x DEO2 } ( -- ) 9 | %INIT-Y { #0008 .Screen/y DEO2 } ( -- ) 10 | %8ADD-X { .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 } ( -- ) 11 | %8ADD-Y { .Screen/y DEI2 #0008 ADD2 .Screen/y DEO2 } ( -- ) 12 | 13 | ( main program ) 14 | |0100 15 | ( set system colors ) 16 | #2ce9 .System/r DEO2 17 | #01c0 .System/g DEO2 18 | #2ce5 .System/b DEO2 19 | 20 | ( set initial x,y coordinates ) 21 | INIT-X INIT-Y 22 | 23 | ( set sprite address ) 24 | ;square .Screen/addr DEO2 25 | 26 | #00 .Screen/sprite DEO 8ADD-X 27 | #01 .Screen/sprite DEO 8ADD-X 28 | #02 .Screen/sprite DEO 8ADD-X 29 | #03 .Screen/sprite DEO 8ADD-Y 30 | 31 | INIT-X 32 | #04 .Screen/sprite DEO 8ADD-X 33 | #05 .Screen/sprite DEO 8ADD-X 34 | #06 .Screen/sprite DEO 8ADD-X 35 | #07 .Screen/sprite DEO 8ADD-Y 36 | 37 | INIT-X 38 | #08 .Screen/sprite DEO 8ADD-X 39 | #09 .Screen/sprite DEO 8ADD-X 40 | #0a .Screen/sprite DEO 8ADD-X 41 | #0b .Screen/sprite DEO 8ADD-Y 42 | 43 | INIT-X 44 | #0c .Screen/sprite DEO 8ADD-X 45 | #0d .Screen/sprite DEO 8ADD-X 46 | #0e .Screen/sprite DEO 8ADD-X 47 | #0f .Screen/sprite DEO 48 | 49 | BRK 50 | 51 | @square ff81 8181 8181 81ff -------------------------------------------------------------------------------- /roms/hello-2bpp-sprite.tal: -------------------------------------------------------------------------------- 1 | ( hello-2bpp-sprite.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | 7 | ( macros ) 8 | %INIT-X { #0008 .Screen/x DEO2 } ( -- ) 9 | %INIT-Y { #0008 .Screen/y DEO2 } ( -- ) 10 | %cADD-X { .Screen/x DEI2 #000c ADD2 .Screen/x DEO2 } ( -- ) 11 | %cADD-Y { .Screen/y DEI2 #000c ADD2 .Screen/y DEO2 } ( -- ) 12 | 13 | ( main program ) 14 | |0100 15 | ( set system colors ) 16 | #2ce9 .System/r DEO2 17 | #01c0 .System/g DEO2 18 | #2ce5 .System/b DEO2 19 | 20 | ( set initial x,y coordinates ) 21 | INIT-X INIT-Y 22 | ( set sprite address ) 23 | ;new-square .Screen/addr DEO2 24 | 25 | #80 .Screen/sprite DEO cADD-X 26 | #81 .Screen/sprite DEO cADD-X 27 | #82 .Screen/sprite DEO cADD-X 28 | #83 .Screen/sprite DEO cADD-Y 29 | 30 | INIT-X 31 | #84 .Screen/sprite DEO cADD-X 32 | #85 .Screen/sprite DEO cADD-X 33 | #86 .Screen/sprite DEO cADD-X 34 | #87 .Screen/sprite DEO cADD-Y 35 | 36 | INIT-X 37 | #88 .Screen/sprite DEO cADD-X 38 | #89 .Screen/sprite DEO cADD-X 39 | #8a .Screen/sprite DEO cADD-X 40 | #8b .Screen/sprite DEO cADD-Y 41 | 42 | INIT-X 43 | #8c .Screen/sprite DEO cADD-X 44 | #8d .Screen/sprite DEO cADD-X 45 | #8e .Screen/sprite DEO cADD-X 46 | #8f .Screen/sprite DEO 47 | 48 | BRK 49 | 50 | @new-square 017f 7b73 6343 7fff 007c 7c7c 7c7c 0000 -------------------------------------------------------------------------------- /src/stack.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, Clone)] 2 | pub struct Stack { 3 | pub st: Vec, // Stack 4 | pub p: usize, // Pointer of the stack 5 | k: usize, // Keep Mode relative pointer 6 | keep_mode: bool, 7 | } 8 | 9 | impl Stack { 10 | pub fn new() -> Self { 11 | Stack { 12 | st: vec![0; 256], 13 | p: 0x00, 14 | k: 1, 15 | keep_mode: false, 16 | } 17 | } 18 | 19 | pub fn set_current_opcode(&mut self, opcode: u8) { 20 | self.k = 1; // reset keep mode relative pointer 21 | if opcode < 0x80 { 22 | self.keep_mode = false; 23 | } else { 24 | self.keep_mode = true; 25 | } 26 | } 27 | 28 | pub fn read(&mut self) -> u8 { 29 | let a = self.st[self.p - self.k]; 30 | // check keep mode bit, on keep mode, global pointer doesn't change but keep mode relative pointer does 31 | if !self.keep_mode { 32 | self.p -= 1; 33 | } else { 34 | self.k += 1; 35 | } 36 | a 37 | } 38 | 39 | pub fn read_short(&mut self) -> u16 { 40 | let b = self.read() as u16; 41 | let a = self.read() as u16; 42 | (a << 8) | b 43 | } 44 | 45 | pub fn write(&mut self, data: u8) { 46 | self.st[self.p] = data; 47 | self.p += 1; 48 | } 49 | 50 | pub fn write_short(&mut self, data: u16) { 51 | let a = (data / 256) as u8; 52 | let b = (data % 256) as u8; 53 | self.write(a); 54 | self.write(b); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /roms/hello-keyboard.tal: -------------------------------------------------------------------------------- 1 | ( hello-keyboard.tal ) 2 | 3 | ( devices ) 4 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 5 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ] 6 | |80 @Controller [ &vector $2 &button $1 &key $1 ] 7 | 8 | ( main program ) 9 | |0100 10 | ( set system colors ) 11 | #2ce9 .System/r DEO2 12 | #01c0 .System/g DEO2 13 | #2ce5 .System/b DEO2 14 | 15 | ( assign controller vector ) 16 | ;on-controller .Controller/vector DEO2 17 | BRK 18 | 19 | @on-controller 20 | ( set x,y coordinates ) 21 | #0008 .Screen/x DEO2 22 | #0008 .Screen/y DEO2 23 | 24 | ( set sprite address ) 25 | ;square .Screen/addr DEO2 26 | 27 | .Controller/key DEI LIT '1 EQU ( is the key '1'? ) 28 | ,&color-1 JCN ( jump to color-1 if that's the case ) 29 | 30 | .Controller/key DEI LIT '2 EQU ( is the key '2'? ) 31 | ,&color-2 JCN ( jump to color-2 if that's the case ) 32 | 33 | .Controller/key DEI LIT '3 EQU ( is the key '3'? ) 34 | ,&color-3 JCN ( jump to color-3 if that's the case ) 35 | 36 | ( in any other case, finish ) 37 | BRK 38 | 39 | &color-1 40 | ( draw sprite in the background ) 41 | ( using color 1 for the outline ) 42 | #01 .Screen/sprite DEO 43 | BRK 44 | 45 | &color-2 46 | ( draw sprite in the background ) 47 | ( using color 2 for the outline ) 48 | #02 .Screen/sprite DEO 49 | BRK 50 | 51 | &color-3 52 | ( draw sprite in the background ) 53 | ( using color 3 for the outline ) 54 | #03 .Screen/sprite DEO 55 | BRK 56 | BRK 57 | 58 | ( sprite ) 59 | @square ff81 8181 8181 81ff 60 | -------------------------------------------------------------------------------- /roms/draw-with-keyboard.tal: -------------------------------------------------------------------------------- 1 | ( draw-with-keyboard.tal ) 2 | ( devices ) 3 | |00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ] 4 | |20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite ] 5 | |80 @Controller [ &vector $2 &button $1 &key $1 ] 6 | 7 | ( main program ) 8 | |0100 9 | ( set system colors ) 10 | #2ce9 .System/r DEO2 11 | #01c0 .System/g DEO2 12 | #2ce5 .System/b DEO2 13 | 14 | ( assign controller vector ) 15 | ;on-controller .Controller/vector DEO2 16 | 17 | ( set initial x,y coordinates ) 18 | #0008 .Screen/x DEO2 19 | #0008 .Screen/y DEO2 20 | ( set sprite address ) 21 | ;square .Screen/addr DEO2 22 | BRK 23 | 24 | @on-controller ( -> ) 25 | .Controller/button DEI DUP ( read and duplicate button byte ) 26 | #01 AND ( isolate bit 0, corresponding to Ctrl ) 27 | ,&fill JCN ( if the bit is not 0, jump to fill, otherwise continue ) 28 | 29 | &outline 30 | #01 .Screen/sprite DEO ( draw outline ) 31 | ,&check-arrows JMP ( continue to check-arrows ) 32 | 33 | &fill 34 | #04 .Screen/sprite DEO ( draw filled ) 35 | 36 | &check-arrows 37 | ( use button byte from the stack ) 38 | DUP #10 AND ( isolate bit 4, corresponding to Up ) 39 | ,&up JCN ( jump if not 0 ) 40 | DUP #20 AND ( isolate bit 5, corresponding to Down ) 41 | ,&down JCN ( jump if not 0 ) 42 | DUP #40 AND ( isolate bit 6, corresponding to Left ) 43 | ,&left JCN ( jump if not 0 ) 44 | DUP #80 AND ( isolate bit 7, corresponding to Right ) 45 | ,&right JCN ( jump if not 0 ) 46 | 47 | POP BRK 48 | 49 | &up 50 | .Screen/y DEI2 #0008 SUB2 .Screen/y DEO2 ( decrement y ) 51 | POP 52 | BRK 53 | &down 54 | .Screen/y DEI2 #0008 ADD2 .Screen/y DEO2 ( increment y ) 55 | POP 56 | BRK 57 | &left 58 | .Screen/x DEI2 #0008 SUB2 .Screen/x DEO2 ( decrement x ) 59 | POP 60 | BRK 61 | &right 62 | .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 ( increment x ) 63 | POP 64 | BRK 65 | BRK 66 | ( sprite ) 67 | @square ff81 8181 8181 81ff -------------------------------------------------------------------------------- /uxnasm.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* 4 | Copyright (c) 2021 Devine Lu Linvega 5 | 6 | Permission to use, copy, modify, and distribute this software for any 7 | purpose with or without fee is hereby granted, provided that the above 8 | copyright notice and this permission notice appear in all copies. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | WITH REGARD TO THIS SOFTWARE. 12 | */ 13 | 14 | #define TRIM 0x0100 15 | #define LENGTH 0x10000 16 | 17 | typedef unsigned char Uint8; 18 | typedef signed char Sint8; 19 | typedef unsigned short Uint16; 20 | 21 | typedef struct { 22 | char name[0x40], items[0x40][0x40]; 23 | Uint8 len; 24 | } Macro; 25 | 26 | typedef struct { 27 | char name[0x40]; 28 | Uint16 addr, refs; 29 | } Label; 30 | 31 | typedef struct { 32 | char name[0x40], rune; 33 | Uint16 addr; 34 | } Reference; 35 | 36 | typedef struct { 37 | Uint8 data[LENGTH]; 38 | unsigned int ptr, length; 39 | Uint16 llen, mlen, rlen; 40 | Label labels[0x400]; 41 | Macro macros[0x100]; 42 | Reference refs[0x800]; 43 | char scope[0x40]; 44 | } Program; 45 | 46 | Program p; 47 | static int litlast = 0; 48 | static int jsrlast = 0; 49 | 50 | /* clang-format off */ 51 | 52 | static char ops[][4] = { 53 | "LIT", "INC", "POP", "NIP", "SWP", "ROT", "DUP", "OVR", 54 | "EQU", "NEQ", "GTH", "LTH", "JMP", "JCN", "JSR", "STH", 55 | "LDZ", "STZ", "LDR", "STR", "LDA", "STA", "DEI", "DEO", 56 | "ADD", "SUB", "MUL", "DIV", "AND", "ORA", "EOR", "SFT" 57 | }; 58 | 59 | static int scmp(char *a, char *b, int len) { int i = 0; while(a[i] == b[i]) if(!a[i] || ++i >= len) return 1; return 0; } /* string compare */ 60 | static int sihx(char *s) { int i = 0; char c; while((c = s[i++])) if(!(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'f')) return 0; return i > 1; } /* string is hexadecimal */ 61 | static int shex(char *s) { int n = 0, i = 0; char c; while((c = s[i++])) if(c >= '0' && c <= '9') n = n * 16 + (c - '0'); else if(c >= 'a' && c <= 'f') n = n * 16 + 10 + (c - 'a'); return n; } /* string to num */ 62 | static int slen(char *s) { int i = 0; while(s[i]) i++; return i; } /* string length */ 63 | static int spos(char *s, char c) { Uint8 i = 0, j; while((j = s[i++])) if(j == c) return i; return -1; } /* character position */ 64 | static char *scpy(char *src, char *dst, int len) { int i = 0; while((dst[i] = src[i]) && i < len - 2) i++; dst[i + 1] = '\0'; return dst; } /* string copy */ 65 | static char *scat(char *dst, const char *src) { char *ptr = dst + slen(dst); while(*src) *ptr++ = *src++; *ptr = '\0'; return dst; } /* string cat */ 66 | 67 | /* clang-format on */ 68 | 69 | static int parse(char *w, FILE *f); 70 | 71 | static int 72 | error(const char *name, const char *msg) 73 | { 74 | fprintf(stderr, "%s: %s\n", name, msg); 75 | return 0; 76 | } 77 | 78 | static char * 79 | sublabel(char *src, char *scope, char *name) 80 | { 81 | return scat(scat(scpy(scope, src, 0x40), "/"), name); 82 | } 83 | 84 | static Macro * 85 | findmacro(char *name) 86 | { 87 | int i; 88 | for(i = 0; i < p.mlen; i++) 89 | if(scmp(p.macros[i].name, name, 0x40)) 90 | return &p.macros[i]; 91 | return NULL; 92 | } 93 | 94 | static Label * 95 | findlabel(char *name) 96 | { 97 | int i; 98 | for(i = 0; i < p.llen; i++) 99 | if(scmp(p.labels[i].name, name, 0x40)) 100 | return &p.labels[i]; 101 | return NULL; 102 | } 103 | 104 | static Uint8 105 | findopcode(char *s) 106 | { 107 | int i; 108 | for(i = 0; i < 0x20; i++) { 109 | int m = 0; 110 | if(!scmp(ops[i], s, 3)) 111 | continue; 112 | if(!i) i |= (1 << 7); /* force keep for LIT */ 113 | while(s[3 + m]) { 114 | if(s[3 + m] == '2') 115 | i |= (1 << 5); /* mode: short */ 116 | else if(s[3 + m] == 'r') 117 | i |= (1 << 6); /* mode: return */ 118 | else if(s[3 + m] == 'k') 119 | i |= (1 << 7); /* mode: keep */ 120 | else 121 | return 0; /* failed to match */ 122 | m++; 123 | } 124 | return i; 125 | } 126 | return 0; 127 | } 128 | 129 | static int 130 | makemacro(char *name, FILE *f) 131 | { 132 | Macro *m; 133 | char word[0x40]; 134 | if(findmacro(name)) 135 | return error("Macro duplicate", name); 136 | if(sihx(name) && slen(name) % 2 == 0) 137 | return error("Macro name is hex number", name); 138 | if(findopcode(name) || scmp(name, "BRK", 4) || !slen(name)) 139 | return error("Macro name is invalid", name); 140 | if(p.mlen == 0x100) 141 | return error("Macros limit exceeded", name); 142 | m = &p.macros[p.mlen++]; 143 | scpy(name, m->name, 0x40); 144 | while(fscanf(f, "%63s", word) == 1) { 145 | if(word[0] == '{') continue; 146 | if(word[0] == '}') break; 147 | if(word[0] == '%') 148 | return error("Macro error", name); 149 | if(m->len >= 0x40) 150 | return error("Macro size exceeded", name); 151 | scpy(word, m->items[m->len++], 0x40); 152 | } 153 | return 1; 154 | } 155 | 156 | static int 157 | makelabel(char *name) 158 | { 159 | Label *l; 160 | if(findlabel(name)) 161 | return error("Label duplicate", name); 162 | if(sihx(name) && (slen(name) == 2 || slen(name) == 4)) 163 | return error("Label name is hex number", name); 164 | if(findopcode(name) || scmp(name, "BRK", 4) || !slen(name)) 165 | return error("Label name is invalid", name); 166 | if(p.llen == 0x400) 167 | return error("Labels limit exceeded", name); 168 | l = &p.labels[p.llen++]; 169 | l->addr = p.ptr; 170 | l->refs = 0; 171 | scpy(name, l->name, 0x40); 172 | return 1; 173 | } 174 | 175 | static int 176 | makereference(char *scope, char *label, Uint16 addr) 177 | { 178 | char subw[0x40], parent[0x40]; 179 | Reference *r; 180 | if(p.rlen == 0x800) 181 | return error("References limit exceeded", label); 182 | r = &p.refs[p.rlen++]; 183 | if(label[1] == '&') 184 | scpy(sublabel(subw, scope, label + 2), r->name, 0x40); 185 | else { 186 | int pos = spos(label + 1, '/'); 187 | if(pos > 0) { 188 | Label *l; 189 | if((l = findlabel(scpy(label + 1, parent, pos)))) 190 | l->refs++; 191 | } 192 | scpy(label + 1, r->name, 0x40); 193 | } 194 | r->rune = label[0]; 195 | r->addr = addr; 196 | return 1; 197 | } 198 | 199 | static int 200 | writebyte(Uint8 b) 201 | { 202 | if(p.ptr < TRIM) 203 | return error("Writing in zero-page", ""); 204 | else if(p.ptr > 0xffff) 205 | return error("Writing after the end of RAM", ""); 206 | else if(p.ptr < p.length) 207 | return error("Memory overwrite", ""); 208 | p.data[p.ptr++] = b; 209 | p.length = p.ptr; 210 | litlast = 0; 211 | jsrlast = 0; 212 | return 1; 213 | } 214 | 215 | static int 216 | writeopcode(char *w) 217 | { 218 | Uint8 res; 219 | if(jsrlast && scmp(w, "JMP2r", 5)) { /* tail-call optimization */ 220 | p.data[p.ptr - 1] = jsrlast == 2 ? findopcode("JMP2") : findopcode("JMP"); 221 | jsrlast = 0; 222 | return 1; 223 | } 224 | res = writebyte(findopcode(w)); 225 | if(scmp(w, "JSR2", 4)) 226 | jsrlast = 2; 227 | else if(scmp(w, "JSR", 3)) 228 | jsrlast = 1; 229 | return res; 230 | } 231 | 232 | static int 233 | writeshort(Uint16 s, int lit) 234 | { 235 | if(lit) 236 | if(!writebyte(findopcode("LIT2"))) return 0; 237 | return writebyte(s >> 8) && writebyte(s & 0xff); 238 | } 239 | 240 | static int 241 | writelitbyte(Uint8 b) 242 | { 243 | if(litlast) { /* literals optimization */ 244 | Uint8 hb = p.data[p.ptr - 1]; 245 | p.ptr -= 2; 246 | p.length = p.ptr; 247 | return writeshort((hb << 8) + b, 1); 248 | } 249 | if(!writebyte(findopcode("LIT"))) return 0; 250 | if(!writebyte(b)) return 0; 251 | litlast = 1; 252 | return 1; 253 | } 254 | 255 | static int 256 | doinclude(const char *filename) 257 | { 258 | FILE *f; 259 | char w[0x40]; 260 | if(!(f = fopen(filename, "r"))) 261 | return error("Include missing", filename); 262 | while(fscanf(f, "%63s", w) == 1) 263 | if(!parse(w, f)) 264 | return error("Unknown token", w); 265 | fclose(f); 266 | return 1; 267 | } 268 | 269 | static int 270 | parse(char *w, FILE *f) 271 | { 272 | int i; 273 | char word[0x40], subw[0x40], c; 274 | Macro *m; 275 | if(slen(w) >= 63) 276 | return error("Invalid token", w); 277 | switch(w[0]) { 278 | case '(': /* comment */ 279 | if(slen(w) != 1) fprintf(stderr, "-- Malformed comment: %s\n", w); 280 | i = 1; /* track nested comment depth */ 281 | while(fscanf(f, "%63s", word) == 1) { 282 | if(slen(word) != 1) 283 | continue; 284 | else if(word[0] == '(') 285 | i++; 286 | else if(word[0] == ')' && --i < 1) 287 | break; 288 | } 289 | break; 290 | case '~': /* include */ 291 | if(!doinclude(w + 1)) 292 | return error("Invalid include", w); 293 | break; 294 | case '%': /* macro */ 295 | if(!makemacro(w + 1, f)) 296 | return error("Invalid macro", w); 297 | break; 298 | case '|': /* pad-absolute */ 299 | if(!sihx(w + 1)) 300 | return error("Invalid padding", w); 301 | p.ptr = shex(w + 1); 302 | litlast = jsrlast = 0; 303 | break; 304 | case '$': /* pad-relative */ 305 | if(!sihx(w + 1)) 306 | return error("Invalid padding", w); 307 | p.ptr += shex(w + 1); 308 | litlast = jsrlast = 0; 309 | break; 310 | case '@': /* label */ 311 | if(!makelabel(w + 1)) 312 | return error("Invalid label", w); 313 | scpy(w + 1, p.scope, 0x40); 314 | litlast = jsrlast = 0; 315 | break; 316 | case '&': /* sublabel */ 317 | if(!makelabel(sublabel(subw, p.scope, w + 1))) 318 | return error("Invalid sublabel", w); 319 | litlast = jsrlast = 0; 320 | break; 321 | case '#': /* literals hex */ 322 | if(!sihx(w + 1) || (slen(w) != 3 && slen(w) != 5)) 323 | return error("Invalid hex literal", w); 324 | if(slen(w) == 3) { 325 | if(!writelitbyte(shex(w + 1))) return 0; 326 | } else if(slen(w) == 5) { 327 | if(!writeshort(shex(w + 1), 1)) return 0; 328 | } 329 | break; 330 | case '.': /* literal byte zero-page */ 331 | makereference(p.scope, w, p.ptr - litlast); 332 | if(!writelitbyte(0xff)) return 0; 333 | break; 334 | case ',': /* literal byte relative */ 335 | makereference(p.scope, w, p.ptr - litlast); 336 | if(!writelitbyte(0xff)) return 0; 337 | break; 338 | case ';': /* literal short absolute */ 339 | makereference(p.scope, w, p.ptr); 340 | if(!writeshort(0xffff, 1)) return 0; 341 | break; 342 | case ':': /* raw short absolute */ 343 | makereference(p.scope, w, p.ptr); 344 | if(!writeshort(0xffff, 0)) return 0; 345 | break; 346 | case '\'': /* raw char */ 347 | if(!writebyte((Uint8)w[1])) return 0; 348 | break; 349 | case '"': /* raw string */ 350 | i = 0; 351 | while((c = w[++i])) 352 | if(!writebyte(c)) return 0; 353 | break; 354 | case '[': 355 | case ']': 356 | if(slen(w) == 1) break; /* else fallthrough */ 357 | default: 358 | /* opcode */ 359 | if(findopcode(w) || scmp(w, "BRK", 4)) { 360 | if(!writeopcode(w)) return 0; 361 | } 362 | /* raw byte */ 363 | else if(sihx(w) && slen(w) == 2) { 364 | if(!writebyte(shex(w))) return 0; 365 | } 366 | /* raw short */ 367 | else if(sihx(w) && slen(w) == 4) { 368 | if(!writeshort(shex(w), 0)) return 0; 369 | } 370 | /* macro */ 371 | else if((m = findmacro(w))) { 372 | for(i = 0; i < m->len; i++) 373 | if(!parse(m->items[i], f)) 374 | return 0; 375 | return 1; 376 | } else 377 | return error("Unknown token", w); 378 | } 379 | return 1; 380 | } 381 | 382 | static int 383 | resolve(void) 384 | { 385 | Label *l; 386 | int i; 387 | for(i = 0; i < p.rlen; i++) { 388 | Reference *r = &p.refs[i]; 389 | switch(r->rune) { 390 | case '.': 391 | if(!(l = findlabel(r->name))) 392 | return error("Unknown zero-page reference", r->name); 393 | p.data[r->addr + 1] = l->addr & 0xff; 394 | l->refs++; 395 | break; 396 | case ',': 397 | if(!(l = findlabel(r->name))) 398 | return error("Unknown relative reference", r->name); 399 | p.data[r->addr + 1] = (Sint8)(l->addr - r->addr - 3); 400 | if((Sint8)p.data[r->addr + 1] != (l->addr - r->addr - 3)) 401 | return error("Relative reference is too far", r->name); 402 | l->refs++; 403 | break; 404 | case ';': 405 | if(!(l = findlabel(r->name))) 406 | return error("Unknown absolute reference", r->name); 407 | p.data[r->addr + 1] = l->addr >> 0x8; 408 | p.data[r->addr + 2] = l->addr & 0xff; 409 | l->refs++; 410 | break; 411 | case ':': 412 | if(!(l = findlabel(r->name))) 413 | return error("Unknown absolute reference", r->name); 414 | p.data[r->addr + 0] = l->addr >> 0x8; 415 | p.data[r->addr + 1] = l->addr & 0xff; 416 | l->refs++; 417 | break; 418 | default: 419 | return error("Unknown reference", r->name); 420 | } 421 | } 422 | return 1; 423 | } 424 | 425 | static int 426 | assemble(FILE *f) 427 | { 428 | char w[0x40]; 429 | scpy("on-reset", p.scope, 0x40); 430 | while(fscanf(f, "%63s", w) == 1) 431 | if(!parse(w, f)) 432 | return error("Unknown token", w); 433 | return resolve(); 434 | } 435 | 436 | static void 437 | review(char *filename) 438 | { 439 | int i; 440 | for(i = 0; i < p.llen; i++) 441 | if(p.labels[i].name[0] >= 'A' && p.labels[i].name[0] <= 'Z') 442 | continue; /* Ignore capitalized labels(devices) */ 443 | else if(!p.labels[i].refs) 444 | fprintf(stderr, "-- Unused label: %s\n", p.labels[i].name); 445 | fprintf(stderr, 446 | "Assembled %s in %d bytes(%.2f%% used), %d labels, %d macros.\n", 447 | filename, 448 | p.length - TRIM, 449 | (p.length - TRIM) / 652.80, 450 | p.llen, 451 | p.mlen); 452 | } 453 | 454 | int 455 | main(int argc, char *argv[]) 456 | { 457 | FILE *src, *dst; 458 | if(argc < 3) 459 | return !error("usage", "input.tal output.rom"); 460 | if(!(src = fopen(argv[1], "r"))) 461 | return !error("Invalid input", argv[1]); 462 | if(!assemble(src)) 463 | return !error("Assembly", "Failed to assemble rom."); 464 | if(!(dst = fopen(argv[2], "wb"))) 465 | return !error("Invalid Output", argv[2]); 466 | if(p.length <= TRIM) 467 | return !error("Assembly", "Output rom is empty."); 468 | fwrite(p.data + TRIM, p.length - TRIM, 1, dst); 469 | review(argv[2]); 470 | return 0; 471 | } 472 | -------------------------------------------------------------------------------- /src/devices.rs: -------------------------------------------------------------------------------- 1 | use num_enum::FromPrimitive; 2 | 3 | #[repr(u8)] 4 | #[derive(FromPrimitive)] 5 | enum Device { 6 | #[num_enum(default)] 7 | SystemRedHigh = 0x08, 8 | SystemRedLow = 0x09, 9 | SystemGreenHigh = 0x0a, 10 | SystemGreenLow = 0x0b, 11 | SystemBlueHigh = 0x0c, 12 | SystemBlueLow = 0x0d, 13 | ConsoleWrite = 0x18, 14 | ScreenVectorHigh = 0x20, 15 | ScreenVectorLow = 0x21, 16 | ScreenWidthHigh = 0x22, 17 | ScreenWidthLow = 0x23, 18 | ScreenHeightHigh = 0x24, 19 | ScreenHeightLow = 0x25, 20 | ScreenAuto = 0x26, 21 | ScreenXHigh = 0x28, 22 | ScreenXLow = 0x29, 23 | ScreenYHigh = 0x2a, 24 | ScreenYLow = 0x2b, 25 | ScreenAddressHigh = 0x2c, 26 | ScreenAddressLow = 0x2d, 27 | ScreenPixel = 0x2e, 28 | ScreenSprite = 0x2f, 29 | ControllerVectorHigh = 0x80, 30 | ControllerVectorLow = 0x81, 31 | ControllerButton = 0x82, 32 | ControllerKey = 0x83, 33 | } 34 | 35 | pub const SCREEN_WIDTH: usize = 512; 36 | const SCREEN_WIDTH_HIGH: u8 = (SCREEN_WIDTH / 256) as u8; 37 | const SCREEN_WIDTH_LOW: u8 = (SCREEN_WIDTH % 256) as u8; 38 | pub const SCREEN_HEIGHT: usize = 312; 39 | const SCREEN_HEIGHT_HIGH: u8 = (SCREEN_HEIGHT / 256) as u8; 40 | const SCREEN_HEIGHT_LOW: u8 = (SCREEN_HEIGHT % 256) as u8; 41 | const SCREEN_SIZE: usize = (SCREEN_WIDTH * SCREEN_HEIGHT * 4) as usize; 42 | 43 | #[derive(Clone)] 44 | pub struct Devices { 45 | system: [u8; 16], 46 | screen: [u8; 16], 47 | controller: [u8; 4], 48 | pub screen_buffer_bg: Vec, 49 | pub screen_buffer_fg: Vec, 50 | } 51 | 52 | impl Default for Devices { 53 | fn default() -> Self { 54 | Devices { 55 | system: [0; 16], 56 | screen: [0; 16], 57 | controller: [0; 4], 58 | screen_buffer_bg: vec![0; SCREEN_SIZE], 59 | screen_buffer_fg: vec![0; SCREEN_SIZE], 60 | } 61 | } 62 | } 63 | 64 | impl Devices { 65 | pub fn write(&mut self, val: u8, device: u8, mem: &Vec) { 66 | match Device::from(device) { 67 | Device::SystemRedHigh => { 68 | self.system[8] = val; 69 | } 70 | Device::SystemRedLow => { 71 | self.system[9] = val; 72 | } 73 | Device::SystemGreenHigh => { 74 | self.system[10] = val; 75 | } 76 | Device::SystemGreenLow => { 77 | self.system[11] = val; 78 | } 79 | Device::SystemBlueHigh => { 80 | self.system[12] = val; 81 | } 82 | Device::SystemBlueLow => { 83 | self.system[13] = val; 84 | } 85 | Device::ConsoleWrite => { 86 | print!("{}", val as char); 87 | } 88 | Device::ScreenVectorHigh => { 89 | self.screen[0] = val; 90 | } 91 | Device::ScreenVectorLow => { 92 | self.screen[1] = val; 93 | } 94 | Device::ScreenXHigh => { 95 | self.screen[7] = val; 96 | } 97 | Device::ScreenXLow => { 98 | self.screen[8] = val; 99 | } 100 | Device::ScreenYHigh => { 101 | self.screen[9] = val; 102 | } 103 | Device::ScreenYLow => { 104 | self.screen[10] = val; 105 | } 106 | Device::ScreenAddressHigh => { 107 | self.screen[11] = val; 108 | } 109 | Device::ScreenAddressLow => { 110 | self.screen[12] = val; 111 | } 112 | Device::ScreenPixel => { 113 | let x: u16 = self.get_screen_x(); 114 | let y: u16 = self.get_screen_y(); 115 | let color0 = self.get_color0(); 116 | let color1 = self.get_color1(); 117 | let color2 = self.get_color2(); 118 | let color3 = self.get_color3(); 119 | 120 | match val { 121 | 0x00 => self.draw_screen_bg(x, y, color0), 122 | 0x01 => self.draw_screen_bg(x, y, color1), 123 | 0x02 => self.draw_screen_bg(x, y, color2), 124 | 0x03 => self.draw_screen_bg(x, y, color3), 125 | 0x40 => self.draw_screen_fg(x, y, color0), 126 | 0x41 => self.draw_screen_fg(x, y, color1), 127 | 0x42 => self.draw_screen_fg(x, y, color2), 128 | 0x43 => self.draw_screen_fg(x, y, color3), 129 | _ => {} 130 | } 131 | } 132 | Device::ScreenSprite => { 133 | let address: usize = (self.screen[11] as usize) * 256 + self.screen[12] as usize; 134 | if val > 127 { 135 | self.draw_sprite_2bpp(address, mem, val); 136 | } else { 137 | self.draw_sprite_1bpp(address, mem, val); 138 | } 139 | } 140 | Device::ControllerVectorHigh => { 141 | self.controller[0] = val; 142 | } 143 | Device::ControllerVectorLow => { 144 | self.controller[1] = val; 145 | } 146 | _ => todo!(), 147 | } 148 | } 149 | 150 | fn get_sprite_color(&self, val: u8) -> [Option<[u8; 4]>; 4] { 151 | let color0 = self.get_color0(); 152 | let color1 = self.get_color1(); 153 | let color2 = self.get_color2(); 154 | let color3 = self.get_color3(); 155 | match val & 0b00001111 { 156 | 0x00 => [Some(color0), Some(color0), Some(color1), Some(color2)], 157 | 0x01 => [Some(color0), Some(color1), Some(color2), Some(color3)], 158 | 0x02 => [Some(color0), Some(color2), Some(color3), Some(color1)], 159 | 0x03 => [Some(color0), Some(color3), Some(color1), Some(color2)], 160 | 0x04 => [Some(color1), Some(color0), Some(color1), Some(color2)], 161 | 0x05 => [None, Some(color1), Some(color2), Some(color3)], 162 | 0x06 => [Some(color1), Some(color2), Some(color3), Some(color1)], 163 | 0x07 => [Some(color1), Some(color3), Some(color1), Some(color2)], 164 | 0x08 => [Some(color2), Some(color0), Some(color1), Some(color2)], 165 | 0x09 => [Some(color2), Some(color1), Some(color2), Some(color3)], 166 | 0x0a => [None, Some(color2), Some(color3), Some(color1)], 167 | 0x0b => [Some(color2), Some(color3), Some(color1), Some(color2)], 168 | 0x0c => [Some(color3), Some(color0), Some(color1), Some(color2)], 169 | 0x0d => [Some(color3), Some(color1), Some(color2), Some(color3)], 170 | 0x0e => [Some(color3), Some(color2), Some(color3), Some(color1)], 171 | 0x0f => [None, Some(color3), Some(color1), Some(color2)], 172 | _ => unreachable!(), 173 | } 174 | } 175 | 176 | fn draw_sprite_1bpp(&mut self, address: usize, mem: &Vec, val: u8) { 177 | let x = self.get_screen_x(); 178 | let y = self.get_screen_y(); 179 | let sprite_colors = self.get_sprite_color(val); 180 | for i in 0..8 { 181 | let line = mem[address + i]; 182 | let mut mask = 0b10000000; 183 | 184 | for j in 0..8 { 185 | let pixel = (line & mask) > 0; 186 | mask = mask >> 1; 187 | 188 | let i = i as u16; 189 | 190 | if val & 0b00001111 == 0 { 191 | self.draw_screen_fg(x + j, y + i, [0, 0, 0, 0]); 192 | } else { 193 | if pixel { 194 | if let Some(color) = sprite_colors[1] { 195 | self.draw_screen_fg(x + j, y + i, color); 196 | } 197 | } else { 198 | if let Some(color) = sprite_colors[0] { 199 | self.draw_screen_fg(x + j, y + i, color); 200 | } 201 | } 202 | } 203 | } 204 | } 205 | } 206 | 207 | fn draw_sprite_2bpp(&mut self, address: usize, mem: &Vec, val: u8) { 208 | let x = self.get_screen_x(); 209 | let y = self.get_screen_y(); 210 | let sprite_colors = self.get_sprite_color(val); 211 | for i in 0..8 { 212 | let line1 = mem[address + i]; 213 | let line2 = mem[address + 8 + i]; 214 | let mut mask = 0b10000000; 215 | 216 | for j in 0..8 { 217 | let pixel1 = (line1 & mask) > 0; 218 | let pixel2 = (line2 & mask) > 0; 219 | mask = mask >> 1; 220 | 221 | let i = i as u16; 222 | 223 | match (pixel1, pixel2) { 224 | (false, false) => { 225 | if let Some(color) = sprite_colors[0] { 226 | self.draw_screen_fg(x + j, y + i, color); 227 | } 228 | } 229 | (false, true) => { 230 | if let Some(color) = sprite_colors[1] { 231 | self.draw_screen_fg(x + j, y + i, color); 232 | } 233 | } 234 | (true, false) => { 235 | if let Some(color) = sprite_colors[2] { 236 | self.draw_screen_fg(x + j, y + i, color); 237 | } 238 | } 239 | (true, true) => { 240 | if let Some(color) = sprite_colors[3] { 241 | self.draw_screen_fg(x + j, y + i, color); 242 | } 243 | } 244 | } 245 | } 246 | } 247 | } 248 | 249 | pub fn get_button(&self) -> u8 { 250 | self.controller[2] 251 | } 252 | 253 | pub fn set_button(&mut self, button: u8) { 254 | self.controller[2] = button; 255 | } 256 | 257 | pub fn get_key(&self) -> u8 { 258 | self.controller[3] 259 | } 260 | 261 | pub fn set_key(&mut self, key: u8) { 262 | self.controller[3] = key; 263 | } 264 | 265 | pub fn get_controller_vector(&self) -> u16 { 266 | (self.controller[0] as u16) * 256 + self.controller[1] as u16 267 | } 268 | 269 | pub fn get_screen_vector(&self) -> u16 { 270 | (self.screen[0] as u16) * 256 + self.screen[1] as u16 271 | } 272 | 273 | fn get_screen_x(&self) -> u16 { 274 | (self.screen[7] as u16) * 256 + self.screen[8] as u16 275 | } 276 | 277 | fn get_screen_y(&self) -> u16 { 278 | (self.screen[9] as u16) * 256 + self.screen[10] as u16 279 | } 280 | 281 | fn get_color0(&self) -> [u8; 4] { 282 | [ 283 | (self.system[8] >> 4) | (self.system[8] >> 4) << 4, 284 | (self.system[10] >> 4) | (self.system[10] >> 4) << 4, 285 | (self.system[12] >> 4) | (self.system[12] >> 4) << 4, 286 | 0xff, 287 | ] 288 | } 289 | 290 | fn get_color1(&self) -> [u8; 4] { 291 | [ 292 | (self.system[8] << 4) | (self.system[8] << 4) >> 4, 293 | (self.system[10] << 4) | (self.system[10] << 4) >> 4, 294 | (self.system[12] << 4) | (self.system[12] << 4) >> 4, 295 | 0xff, 296 | ] 297 | } 298 | 299 | fn get_color2(&self) -> [u8; 4] { 300 | [ 301 | (self.system[9] >> 4) | (self.system[9] >> 4) << 4, 302 | (self.system[11] >> 4) | (self.system[11] >> 4) << 4, 303 | (self.system[13] >> 4) | (self.system[13] >> 4) << 4, 304 | 0xff, 305 | ] 306 | } 307 | 308 | fn get_color3(&self) -> [u8; 4] { 309 | [ 310 | (self.system[9] << 4) | (self.system[9] << 4) >> 4, 311 | (self.system[11] << 4) | (self.system[11] << 4) >> 4, 312 | (self.system[13] << 4) | (self.system[13] << 4) >> 4, 313 | 0xff, 314 | ] 315 | } 316 | 317 | fn draw_screen_bg(&mut self, x: u16, y: u16, color: [u8; 4]) { 318 | let base: usize = ((x as usize) + (y as usize * SCREEN_WIDTH)) * 4; 319 | self.screen_buffer_bg[base] = color[0]; 320 | self.screen_buffer_bg[base + 1] = color[1]; 321 | self.screen_buffer_bg[base + 2] = color[2]; 322 | self.screen_buffer_bg[base + 3] = color[3]; 323 | } 324 | 325 | fn draw_screen_fg(&mut self, x: u16, y: u16, color: [u8; 4]) { 326 | let base: usize = ((x as usize) + (y as usize * SCREEN_WIDTH)) * 4; 327 | self.screen_buffer_fg[base] = color[0]; 328 | self.screen_buffer_fg[base + 1] = color[1]; 329 | self.screen_buffer_fg[base + 2] = color[2]; 330 | self.screen_buffer_fg[base + 3] = color[3]; 331 | } 332 | 333 | pub fn write_short(&mut self, val: u16, device: u8, mem: &Vec) { 334 | let next_device = device + 1; 335 | self.write((val / 256) as u8, device, mem); 336 | self.write((val % 256) as u8, next_device, mem); 337 | } 338 | 339 | pub fn read(&self, device: u8) -> u8 { 340 | match Device::from(device) { 341 | Device::ScreenXHigh => self.screen[7], 342 | Device::ScreenXLow => self.screen[8], 343 | Device::ScreenYHigh => self.screen[9], 344 | Device::ScreenYLow => self.screen[10], 345 | Device::ScreenWidthHigh => SCREEN_WIDTH_HIGH, 346 | Device::ScreenWidthLow => SCREEN_WIDTH_LOW, 347 | Device::ScreenHeightHigh => SCREEN_HEIGHT_HIGH, 348 | Device::ScreenHeightLow => SCREEN_HEIGHT_LOW, 349 | Device::ControllerButton => self.controller[2], 350 | Device::ControllerKey => self.controller[3], 351 | _ => todo!(), 352 | } 353 | } 354 | 355 | pub fn read_short(&self, device: u8) -> u16 { 356 | let high = self.read(device) as u16; 357 | let low = self.read(device + 1) as u16; 358 | high * 256 + low 359 | } 360 | } 361 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![allow(clippy::upper_case_acronyms)] 2 | use std::env; 3 | use std::fs::File; 4 | use std::io::prelude::*; 5 | 6 | use ggez::conf::{WindowMode, WindowSetup}; 7 | use ggez::event; 8 | use ggez::input::keyboard::{KeyInput, KeyMods, KeyCode}; 9 | use ggez::graphics::{self, *}; 10 | use ggez::{Context, GameResult}; 11 | use num_enum::FromPrimitive; 12 | 13 | mod devices; 14 | mod stack; 15 | 16 | use devices::{Devices, SCREEN_HEIGHT, SCREEN_WIDTH}; 17 | use stack::Stack; 18 | 19 | // https://wiki.xxiivv.com/site/uxntal_reference.html 20 | #[repr(u8)] 21 | #[derive(FromPrimitive)] 22 | enum Instruction { 23 | #[num_enum(default)] 24 | BRK = 0x00, 25 | INC = 0x01, 26 | POP = 0x02, 27 | NIP = 0x03, 28 | SWP = 0x04, 29 | ROT = 0x05, 30 | DUP = 0x06, 31 | OVR = 0x07, 32 | EQU = 0x08, 33 | NEQ = 0x09, 34 | GTH = 0x0a, 35 | LTH = 0x0b, 36 | JMP = 0x0c, 37 | JCN = 0x0d, 38 | JSR = 0x0e, 39 | STH = 0x0f, 40 | LDZ = 0x10, 41 | STZ = 0x11, 42 | DEI = 0x16, 43 | DEO = 0x17, 44 | ADD = 0x18, 45 | SUB = 0x19, 46 | MUL = 0x1a, 47 | DIV = 0x1b, 48 | AND = 0x1c, 49 | ORA = 0x1d, 50 | EOR = 0x1e, 51 | SFT = 0x1f, 52 | INC2 = 0x21, 53 | POP2 = 0x22, 54 | NIP2 = 0x23, 55 | SWP2 = 0x24, 56 | ROT2 = 0x25, 57 | DUP2 = 0x26, 58 | OVR2 = 0x27, 59 | EQU2 = 0x28, 60 | NEQ2 = 0x29, 61 | GTH2 = 0x2a, 62 | LTH2 = 0x2b, 63 | DEI2 = 0x36, 64 | DEO2 = 0x37, 65 | ADD2 = 0x38, 66 | SUB2 = 0x39, 67 | MUL2 = 0x3a, 68 | DIV2 = 0x3b, 69 | AND2 = 0x3c, 70 | ORA2 = 0x3d, 71 | EOR2 = 0x3e, 72 | SFT2 = 0x3f, 73 | INCr = 0x41, 74 | POPr = 0x42, 75 | NIPr = 0x43, 76 | SWPr = 0x44, 77 | ROTr = 0x45, 78 | DUPr = 0x46, 79 | OVRr = 0x47, 80 | EQUr = 0x48, 81 | NEQr = 0x49, 82 | GTHr = 0x4a, 83 | LTHr = 0x4b, 84 | ADDr = 0x58, 85 | SUBr = 0x59, 86 | MULr = 0x5a, 87 | DIVr = 0x5b, 88 | ANDr = 0x5c, 89 | ORAr = 0x5d, 90 | EORr = 0x5e, 91 | SFTr = 0x5f, 92 | INC2r = 0x61, 93 | POP2r = 0x62, 94 | NIP2r = 0x63, 95 | SWP2r = 0x64, 96 | ROT2r = 0x65, 97 | DUP2r = 0x66, 98 | OVR2r = 0x67, 99 | EQU2r = 0x68, 100 | NEQ2r = 0x69, 101 | GTH2r = 0x6a, 102 | LTH2r = 0x6b, 103 | ADD2r = 0x78, 104 | SUB2r = 0x79, 105 | MUL2r = 0x7a, 106 | DIV2r = 0x7b, 107 | AND2r = 0x7c, 108 | ORA2r = 0x7d, 109 | EOR2r = 0x7e, 110 | SFT2r = 0x7f, 111 | LIT = 0x80, 112 | INCk = 0x81, 113 | POPk = 0x82, 114 | NIPk = 0x83, 115 | SWPk = 0x84, 116 | ROTk = 0x85, 117 | DUPk = 0x86, 118 | OVRk = 0x87, 119 | EQUk = 0x88, 120 | NEQk = 0x89, 121 | GTHk = 0x8a, 122 | LTHk = 0x8b, 123 | JMPk = 0x8c, 124 | JCNk = 0x8d, 125 | JSRk = 0x8e, 126 | STHk = 0x8f, 127 | ADDk = 0x98, 128 | SUBk = 0x99, 129 | MULk = 0x9a, 130 | DIVk = 0x9b, 131 | ANDk = 0x9c, 132 | ORAk = 0x9d, 133 | EORk = 0x9e, 134 | SFTk = 0x9f, 135 | LIT2 = 0xa0, 136 | INC2k = 0xa1, 137 | POP2k = 0xa2, 138 | NIP2k = 0xa3, 139 | SWP2k = 0xa4, 140 | ROT2k = 0xa5, 141 | DUP2k = 0xa6, 142 | OVR2k = 0xa7, 143 | EQU2k = 0xa8, 144 | NEQ2k = 0xa9, 145 | GTH2k = 0xaa, 146 | LTH2k = 0xab, 147 | ADD2k = 0xb8, 148 | SUB2k = 0xb9, 149 | MUL2k = 0xba, 150 | DIV2k = 0xbb, 151 | AND2k = 0xbc, 152 | ORA2k = 0xbd, 153 | EOR2k = 0xbe, 154 | SFT2k = 0xbf, 155 | LITr = 0xc0, 156 | INCkr = 0xc1, 157 | POPkr = 0xc2, 158 | NIPkr = 0xc3, 159 | SWPkr = 0xc4, 160 | ROTkr = 0xc5, 161 | DUPkr = 0xc6, 162 | OVRkr = 0xc7, 163 | EQUkr = 0xc8, 164 | NEQkr = 0xc9, 165 | GTHkr = 0xca, 166 | LTHkr = 0xcb, 167 | ADDkr = 0xd8, 168 | SUBkr = 0xd9, 169 | MULkr = 0xda, 170 | DIVkr = 0xdb, 171 | ANDkr = 0xdc, 172 | ORAkr = 0xdd, 173 | EORkr = 0xde, 174 | SFTkr = 0xdf, 175 | LIT2r = 0xe0, 176 | INC2kr = 0xe1, 177 | POP2kr = 0xe2, 178 | NIP2kr = 0xe3, 179 | SWP2kr = 0xe4, 180 | ROT2kr = 0xe5, 181 | DUP2kr = 0xe6, 182 | OVR2kr = 0xe7, 183 | EQU2kr = 0xe8, 184 | NEQ2kr = 0xe9, 185 | GTH2kr = 0xea, 186 | LTH2kr = 0xeb, 187 | ADD2kr = 0xf8, 188 | SUB2kr = 0xf9, 189 | MUL2kr = 0xfa, 190 | DIV2kr = 0xfb, 191 | AND2kr = 0xfc, 192 | ORA2kr = 0xfd, 193 | EOR2kr = 0xfe, 194 | SFT2kr = 0xff, 195 | } 196 | 197 | struct MachineState { 198 | wst: Stack, 199 | rst: Stack, 200 | mem: Vec, 201 | pc: u16, 202 | devices: Devices, 203 | } 204 | 205 | impl MachineState { 206 | fn from_code(code: Vec) -> Self { 207 | let mut mem: Vec = vec![0; 65536]; 208 | mem[0x0100..0x0100 + code.len()].copy_from_slice(&code); 209 | MachineState { 210 | wst: Stack::new(), 211 | rst: Stack::new(), 212 | mem, 213 | pc: 0x0100, 214 | devices: Devices::default(), 215 | } 216 | } 217 | 218 | fn from_file(file: &str) -> GameResult { 219 | match MachineState::load_file(file) { 220 | Ok(code) => Ok(execute(code)), 221 | Err(_msg) => Err(ggez::GameError::FilesystemError( 222 | "Can't load file".to_string(), 223 | )), 224 | } 225 | } 226 | fn load_file(file: &str) -> Result { 227 | let mut file = File::open(file)?; 228 | let mut buffer = Vec::new(); 229 | file.read_to_end(&mut buffer)?; 230 | let mut mem: Vec = vec![0; 65536]; 231 | mem[0x0100..0x0100 + buffer.len()].copy_from_slice(&buffer); 232 | Ok(MachineState { 233 | wst: Stack::new(), 234 | rst: Stack::new(), 235 | mem, 236 | pc: 0x0100, 237 | devices: Devices::default(), 238 | }) 239 | } 240 | } 241 | 242 | impl event::EventHandler for MachineState { 243 | fn update(&mut self, ctx: &mut Context) -> GameResult { 244 | while ctx.time.check_update_time(60) { 245 | let ns = execute(MachineState { 246 | wst: self.wst.clone(), 247 | rst: self.rst.clone(), 248 | mem: self.mem.clone(), 249 | pc: self.devices.get_screen_vector(), 250 | devices: self.devices.clone(), 251 | }); 252 | self.wst = ns.wst; 253 | self.rst = ns.rst; 254 | self.mem = ns.mem; 255 | self.devices = ns.devices; 256 | } 257 | Ok(()) 258 | } 259 | 260 | fn key_up_event(&mut self, _ctx: &mut Context, keyinput: KeyInput) -> GameResult { 261 | let mut button = self.devices.get_button(); 262 | if let Some(keycode) = keyinput.keycode { 263 | match keycode { 264 | KeyCode::Up => { button ^= 0b00010000; } 265 | KeyCode::Down => { button ^= 0b00100000; } 266 | KeyCode::Left => { button ^= 0b01000000; } 267 | KeyCode::Right => { button ^= 0b10000000; } 268 | _ => {} 269 | }; 270 | } 271 | match keyinput.mods { 272 | KeyMods::CTRL => { button ^= 0b00000001; } 273 | _ => {} 274 | }; 275 | self.devices.set_button(button); 276 | Ok(()) 277 | } 278 | 279 | fn key_down_event(&mut self, _ctx: &mut Context, keyinput: KeyInput, _repeat: bool) -> GameResult { 280 | self.devices.set_key(match keyinput.keycode { 281 | Some(KeyCode::Key1) => b'1', 282 | Some(KeyCode::Key2) => b'2', 283 | Some(KeyCode::Key3) => b'3', 284 | _ => b'\0' 285 | }); 286 | 287 | let mut button = self.devices.get_button(); 288 | if let Some(keycode) = keyinput.keycode { 289 | match keycode { 290 | KeyCode::Up => { button |= 0b00010000; } 291 | KeyCode::Down => { button |= 0b00100000; } 292 | KeyCode::Left => { button |= 0b01000000; } 293 | KeyCode::Right => { button |= 0b10000000; } 294 | _ => {} 295 | }; 296 | } 297 | match keyinput.mods { 298 | KeyMods::CTRL => { button |= 0b00000001; } 299 | _ => {} 300 | }; 301 | self.devices.set_button(button); 302 | 303 | let ns = execute(MachineState { 304 | wst: self.wst.clone(), 305 | rst: self.rst.clone(), 306 | mem: self.mem.clone(), 307 | pc: self.devices.get_controller_vector(), 308 | devices: self.devices.clone(), 309 | }); 310 | self.wst = ns.wst; 311 | self.rst = ns.rst; 312 | self.mem = ns.mem; 313 | self.devices = ns.devices; 314 | Ok(()) 315 | } 316 | 317 | fn draw(&mut self, ctx: &mut Context) -> GameResult { 318 | let mut canvas = graphics::Canvas::from_frame(ctx, Color::BLACK); 319 | canvas.set_sampler(Sampler::nearest_clamp()); 320 | 321 | let image_bg = Image::from_pixels( 322 | ctx, 323 | &self.devices.screen_buffer_bg, 324 | ImageFormat::Rgba8Unorm, 325 | SCREEN_WIDTH as u32, 326 | SCREEN_HEIGHT as u32, 327 | ); 328 | image_bg.draw(&mut canvas, DrawParam::new()); 329 | 330 | let image_fg = Image::from_pixels( 331 | ctx, 332 | &self.devices.screen_buffer_fg, 333 | ImageFormat::Rgba8Unorm, 334 | SCREEN_WIDTH as u32, 335 | SCREEN_HEIGHT as u32, 336 | ); 337 | image_fg.draw(&mut canvas, DrawParam::new()); 338 | 339 | canvas.finish(ctx) 340 | } 341 | } 342 | 343 | fn main() -> GameResult { 344 | let args: Vec = env::args().collect(); 345 | if args.len() == 2 { 346 | let cb = ggez::ContextBuilder::new("eresma", "aarroyoc"); 347 | let cb = cb.window_setup(WindowSetup { 348 | title: "Eresma - UXN/Varvara Computer".to_string(), 349 | ..WindowSetup::default() 350 | }); 351 | let cb = cb.window_mode(WindowMode { 352 | width: 512.0, 353 | height: 320.0, 354 | ..WindowMode::default() 355 | }); 356 | let (mut ctx, event_loop) = cb.build()?; 357 | let state = MachineState::from_file(&args[1])?; 358 | event::run(ctx, event_loop, state) 359 | } else { 360 | panic!("Invalid number of arguments\nUse: eresma ROM_FILE"); 361 | } 362 | } 363 | 364 | fn is_return_mode(opcode: u8) -> bool { 365 | (opcode > 0x40 && opcode < 0x80) || opcode >= 0xc0 366 | } 367 | 368 | #[allow(clippy::redundant_clone)] 369 | fn execute(state: MachineState) -> MachineState { 370 | let mut real_wst = state.wst.clone(); 371 | let mut real_rst = state.rst.clone(); 372 | let mut mem = state.mem.clone(); 373 | let mut pc = state.pc as usize; 374 | let mut devices = state.devices.clone(); 375 | loop { 376 | let (wst, rst) = if is_return_mode(mem[pc]) { 377 | (&mut real_rst, &mut real_wst) 378 | } else { 379 | (&mut real_wst, &mut real_rst) 380 | }; 381 | 382 | wst.set_current_opcode(mem[pc]); 383 | match Instruction::from(mem[pc]) { 384 | Instruction::BRK => { 385 | return MachineState { 386 | wst: real_wst.clone(), 387 | rst: real_rst.clone(), 388 | mem, 389 | pc: pc as u16, 390 | devices: devices.clone(), 391 | }; 392 | } 393 | Instruction::LIT | Instruction::LITr => { 394 | wst.write(mem[pc + 1]); 395 | pc += 2; 396 | } 397 | Instruction::LIT2 | Instruction::LIT2r => { 398 | wst.write(mem[pc + 1]); 399 | wst.write(mem[pc + 2]); 400 | pc += 3; 401 | } 402 | Instruction::INC | Instruction::INCk | Instruction::INCr | Instruction::INCkr => { 403 | let a = wst.read(); 404 | wst.write(a + 1); 405 | pc += 1; 406 | } 407 | Instruction::INC2 | Instruction::INC2k | Instruction::INC2r | Instruction::INC2kr => { 408 | let a = wst.read_short(); 409 | wst.write_short(a + 1); 410 | pc += 1; 411 | } 412 | Instruction::POP | Instruction::POPk | Instruction::POPr | Instruction::POPkr => { 413 | wst.read(); 414 | pc += 1; 415 | } 416 | Instruction::POP2 | Instruction::POP2k | Instruction::POP2r | Instruction::POP2kr => { 417 | wst.read_short(); 418 | pc += 1; 419 | } 420 | Instruction::NIP | Instruction::NIPk | Instruction::NIPr | Instruction::NIPkr => { 421 | let b = wst.read(); 422 | let _ = wst.read(); 423 | wst.write(b); 424 | pc += 1; 425 | } 426 | Instruction::NIP2 | Instruction::NIP2k | Instruction::NIP2r | Instruction::NIP2kr => { 427 | let b = wst.read_short(); 428 | let _ = wst.read_short(); 429 | wst.write_short(b); 430 | pc += 1; 431 | } 432 | Instruction::SWP | Instruction::SWPk | Instruction::SWPr | Instruction::SWPkr => { 433 | let b = wst.read(); 434 | let a = wst.read(); 435 | wst.write(b); 436 | wst.write(a); 437 | pc += 1; 438 | } 439 | Instruction::SWP2 | Instruction::SWP2k | Instruction::SWP2r | Instruction::SWP2kr => { 440 | let b = wst.read_short(); 441 | let a = wst.read_short(); 442 | wst.write_short(b); 443 | wst.write_short(a); 444 | pc += 1; 445 | } 446 | Instruction::ROT | Instruction::ROTk | Instruction::ROTr | Instruction::ROTkr => { 447 | let c = wst.read(); 448 | let b = wst.read(); 449 | let a = wst.read(); 450 | wst.write(b); 451 | wst.write(c); 452 | wst.write(a); 453 | pc += 1; 454 | } 455 | Instruction::ROT2 | Instruction::ROT2k | Instruction::ROT2r | Instruction::ROT2kr => { 456 | let c = wst.read_short(); 457 | let b = wst.read_short(); 458 | let a = wst.read_short(); 459 | wst.write_short(b); 460 | wst.write_short(c); 461 | wst.write_short(a); 462 | pc += 1; 463 | } 464 | Instruction::DUP | Instruction::DUPk | Instruction::DUPr | Instruction::DUPkr => { 465 | let a = wst.read(); 466 | wst.write(a); 467 | wst.write(a); 468 | pc += 1; 469 | } 470 | Instruction::DUP2 | Instruction::DUP2k | Instruction::DUP2r | Instruction::DUP2kr => { 471 | let a = wst.read_short(); 472 | wst.write_short(a); 473 | wst.write_short(a); 474 | pc += 1; 475 | } 476 | Instruction::OVR | Instruction::OVRk | Instruction::OVRr | Instruction::OVRkr => { 477 | let b = wst.read(); 478 | let a = wst.read(); 479 | wst.write(a); 480 | wst.write(b); 481 | wst.write(a); 482 | pc += 1; 483 | } 484 | Instruction::OVR2 | Instruction::OVR2k | Instruction::OVR2r | Instruction::OVR2kr => { 485 | let b = wst.read_short(); 486 | let a = wst.read_short(); 487 | wst.write_short(a); 488 | wst.write_short(b); 489 | wst.write_short(a); 490 | pc += 1; 491 | } 492 | Instruction::EQU | Instruction::EQUk | Instruction::EQUr | Instruction::EQUkr => { 493 | let b = wst.read(); 494 | let a = wst.read(); 495 | let c = if a == b { 0x01 } else { 0x00 }; 496 | wst.write(c); 497 | pc += 1; 498 | } 499 | Instruction::EQU2 | Instruction::EQU2k | Instruction::EQU2r | Instruction::EQU2kr => { 500 | let b = wst.read_short(); 501 | let a = wst.read_short(); 502 | let c = if a == b { 0x01 } else { 0x00 }; 503 | wst.write_short(c); 504 | pc += 1; 505 | } 506 | Instruction::NEQ | Instruction::NEQk | Instruction::NEQr | Instruction::NEQkr => { 507 | let b = wst.read(); 508 | let a = wst.read(); 509 | let c = if a == b { 0x00 } else { 0x01 }; 510 | wst.write(c); 511 | pc += 1; 512 | } 513 | Instruction::NEQ2 | Instruction::NEQ2k | Instruction::NEQ2r | Instruction::NEQ2kr => { 514 | let b = wst.read_short(); 515 | let a = wst.read_short(); 516 | let c = if a == b { 0x00 } else { 0x01 }; 517 | wst.write_short(c); 518 | pc += 1; 519 | } 520 | Instruction::GTH | Instruction::GTHk | Instruction::GTHr | Instruction::GTHkr => { 521 | let b = wst.read(); 522 | let a = wst.read(); 523 | let c = if a < b { 0x00 } else { 0x01 }; 524 | wst.write(c); 525 | pc += 1; 526 | } 527 | Instruction::GTH2 | Instruction::GTH2k | Instruction::GTH2r | Instruction::GTH2kr => { 528 | let b = wst.read_short(); 529 | let a = wst.read_short(); 530 | let c = if a < b { 0x00 } else { 0x01 }; 531 | wst.write_short(c); 532 | pc += 1; 533 | } 534 | Instruction::LTH | Instruction::LTHk | Instruction::LTHr | Instruction::LTHkr => { 535 | let b = wst.read(); 536 | let a = wst.read(); 537 | let c = if a > b { 0x01 } else { 0x00 }; 538 | wst.write(c); 539 | pc += 1; 540 | } 541 | Instruction::LTH2 | Instruction::LTH2k | Instruction::LTH2r | Instruction::LTH2kr => { 542 | let b = wst.read_short(); 543 | let a = wst.read_short(); 544 | let c = if a > b { 0x01 } else { 0x00 }; 545 | wst.write_short(c); 546 | pc += 1; 547 | } 548 | Instruction::JMP | Instruction::JMPk => { 549 | let addr = wst.read(); 550 | pc = (pc as i16 + 1 + addr as i16) as usize; 551 | } 552 | Instruction::JCN | Instruction::JCNk => { 553 | let addr = wst.read(); 554 | let cond = wst.read(); 555 | pc = if cond == 0 { 556 | pc + 1 557 | } else { 558 | (pc as i16 + 1 + addr as i16) as usize 559 | }; 560 | } 561 | Instruction::JSR | Instruction::JSRk => { 562 | let addr = wst.read(); 563 | rst.write((pc - 0x0100) as u8); 564 | pc = (pc as i16 + addr as i16) as usize; 565 | } 566 | Instruction::STH | Instruction::STHk => { 567 | let a = wst.read(); 568 | rst.write(a); 569 | pc += 1; 570 | } 571 | Instruction::LDZ => { 572 | let addr = wst.read(); 573 | let val = mem[addr as usize]; 574 | wst.write(val); 575 | pc += 1; 576 | } 577 | Instruction::STZ => { 578 | let addr = wst.read(); 579 | let val = wst.read(); 580 | mem[addr as usize] = val; 581 | pc += 1; 582 | } 583 | /*Instruction::LDR => { 584 | let addr = wst.read() as i8; 585 | let value = mem[((pc as i16) + addr) as usize]; 586 | wst.write(value); 587 | pc += 1; 588 | } 589 | Instruction::STR => { 590 | let addr = wst.read() as i8; 591 | let val = wst.read(); 592 | mem[((pc as i16) + addr) as usize] = val; 593 | pc += 1; 594 | }*/ 595 | Instruction::DEI => { 596 | let device = wst.read(); 597 | let val = devices.read(device); 598 | wst.write(val); 599 | pc += 1; 600 | } 601 | Instruction::DEO => { 602 | let device = wst.read(); 603 | let val = wst.read(); 604 | devices.write(val, device, &mem); 605 | pc += 1; 606 | } 607 | Instruction::ADD | Instruction::ADDk | Instruction::ADDr | Instruction::ADDkr => { 608 | let b = wst.read(); 609 | let a = wst.read(); 610 | let c = a + b; 611 | wst.write(c); 612 | pc += 1; 613 | } 614 | Instruction::ADD2 | Instruction::ADD2k | Instruction::ADD2r | Instruction::ADD2kr => { 615 | let b = wst.read_short(); 616 | let a = wst.read_short(); 617 | let c = a + b; 618 | wst.write_short(c); 619 | pc += 1; 620 | } 621 | Instruction::SUB | Instruction::SUBk | Instruction::SUBr | Instruction::SUBkr => { 622 | let b = wst.read(); 623 | let a = wst.read(); 624 | let c = a - b; 625 | wst.write(c); 626 | pc += 1; 627 | } 628 | Instruction::SUB2 | Instruction::SUB2k | Instruction::SUB2r | Instruction::SUB2kr => { 629 | let b = wst.read_short(); 630 | let a = wst.read_short(); 631 | let c = a - b; 632 | wst.write_short(c); 633 | pc += 1; 634 | } 635 | Instruction::MUL | Instruction::MULk | Instruction::MULr | Instruction::MULkr => { 636 | let b = wst.read(); 637 | let a = wst.read(); 638 | let c = a * b; 639 | wst.write(c); 640 | pc += 1; 641 | } 642 | Instruction::MUL2 | Instruction::MUL2k | Instruction::MUL2r | Instruction::MUL2kr => { 643 | let b = wst.read_short(); 644 | let a = wst.read_short(); 645 | let c = a * b; 646 | wst.write_short(c); 647 | pc += 1; 648 | } 649 | Instruction::DIV | Instruction::DIVk | Instruction::DIVr | Instruction::DIVkr => { 650 | let b = wst.read(); 651 | let a = wst.read(); 652 | let c = a / b; 653 | wst.write(c); 654 | pc += 1; 655 | } 656 | Instruction::DIV2 | Instruction::DIV2k | Instruction::DIV2r | Instruction::DIV2kr => { 657 | let b = wst.read_short(); 658 | let a = wst.read_short(); 659 | let c = a / b; 660 | wst.write_short(c); 661 | pc += 1; 662 | } 663 | Instruction::AND | Instruction::ANDk | Instruction::ANDr | Instruction::ANDkr => { 664 | let b = wst.read(); 665 | let a = wst.read(); 666 | let c = a & b; 667 | wst.write(c); 668 | pc += 1; 669 | } 670 | Instruction::AND2 | Instruction::AND2k | Instruction::AND2r | Instruction::AND2kr => { 671 | let b = wst.read_short(); 672 | let a = wst.read_short(); 673 | let c = a & b; 674 | wst.write_short(c); 675 | pc += 1; 676 | } 677 | Instruction::ORA | Instruction::ORAk | Instruction::ORAr | Instruction::ORAkr => { 678 | let b = wst.read(); 679 | let a = wst.read(); 680 | let c = a | b; 681 | wst.write(c); 682 | pc += 1; 683 | } 684 | Instruction::ORA2 | Instruction::ORA2k | Instruction::ORA2r | Instruction::ORA2kr => { 685 | let b = wst.read_short(); 686 | let a = wst.read_short(); 687 | let c = a | b; 688 | wst.write_short(c); 689 | pc += 1; 690 | } 691 | Instruction::EOR | Instruction::EORk | Instruction::EORr | Instruction::EORkr => { 692 | let b = wst.read(); 693 | let a = wst.read(); 694 | let c = a ^ b; 695 | wst.write(c); 696 | pc += 1; 697 | } 698 | Instruction::EOR2 | Instruction::EOR2k | Instruction::EOR2r | Instruction::EOR2kr => { 699 | let b = wst.read_short(); 700 | let a = wst.read_short(); 701 | let c = a ^ b; 702 | wst.write_short(c); 703 | pc += 1; 704 | } 705 | Instruction::SFT | Instruction::SFTk | Instruction::SFTr | Instruction::SFTkr => { 706 | let shift = wst.read(); 707 | let a = wst.read(); 708 | let left = shift / 16; 709 | let right = shift % 16; 710 | let c = (a >> right) << left; 711 | wst.write(c); 712 | pc += 1; 713 | } 714 | Instruction::SFT2 | Instruction::SFT2k | Instruction::SFT2r | Instruction::SFT2kr => { 715 | let shift = wst.read(); 716 | let a = wst.read_short(); 717 | let left = shift / 16; 718 | let right = shift % 16; 719 | let c = (a >> right) << left; 720 | wst.write_short(c); 721 | pc += 1; 722 | } 723 | Instruction::DEI2 => { 724 | let device = wst.read(); 725 | let val = devices.read_short(device); 726 | wst.write_short(val); 727 | pc += 1; 728 | } 729 | Instruction::DEO2 => { 730 | let device = wst.read(); 731 | let val = wst.read_short(); 732 | devices.write_short(val, device, &mem); 733 | pc += 1; 734 | } 735 | } 736 | } 737 | } 738 | 739 | #[allow(dead_code)] 740 | fn execute_test(code: Vec) -> MachineState { 741 | let state = MachineState::from_code(code); 742 | execute(state) 743 | } 744 | 745 | #[test] 746 | fn lit() { 747 | let code = vec![0x80, 0x05]; 748 | let mut wst = vec![0; 256]; 749 | wst[0] = 0x05; 750 | let mut memory = vec![0; 65536]; 751 | memory[0x0100] = 0x80; 752 | memory[0x0101] = 0x05; 753 | let state = execute_test(code); 754 | assert_eq!(wst, state.wst.st); 755 | assert_eq!(memory, state.mem); 756 | } 757 | 758 | #[test] 759 | fn lit2() { 760 | let code = vec![0x80, 0x05]; 761 | let mut wst = vec![0; 256]; 762 | wst[0] = 0x05; 763 | let mut memory = vec![0; 65536]; 764 | memory[0x0100] = 0x80; 765 | memory[0x0101] = 0x05; 766 | let state = execute_test(code); 767 | assert_eq!(wst, state.wst.st); 768 | assert_eq!(memory, state.mem); 769 | } 770 | 771 | #[test] 772 | fn inc() { 773 | let code = vec![0x80, 0x05, 0x01]; 774 | let mut wst = vec![0; 256]; 775 | wst[0] = 0x06; 776 | let mut memory = vec![0; 65536]; 777 | memory[0x0100] = 0x80; 778 | memory[0x0101] = 0x05; 779 | memory[0x0102] = 0x01; 780 | let state = execute_test(code); 781 | assert_eq!(wst, state.wst.st); 782 | assert_eq!(memory, state.mem); 783 | } 784 | 785 | #[test] 786 | fn inc_keep() { 787 | let code = vec![0x80, 0x05, 0x81]; 788 | let mut wst = vec![0; 256]; 789 | wst[0] = 0x05; 790 | wst[1] = 0x06; 791 | let state = execute_test(code); 792 | assert_eq!(wst, state.wst.st); 793 | assert_eq!(2, state.wst.p); 794 | } 795 | 796 | #[test] 797 | fn inc_return() { 798 | let code = vec![0xc0, 0x05, 0x41]; 799 | let wst = vec![0; 256]; 800 | let mut rst = vec![0; 256]; 801 | rst[0] = 0x06; 802 | let state = execute_test(code); 803 | assert_eq!(wst, state.wst.st); 804 | assert_eq!(0, state.wst.p); 805 | assert_eq!(rst, state.rst.st); 806 | assert_eq!(1, state.rst.p); 807 | } 808 | 809 | #[test] 810 | fn inc_keep_return() { 811 | let code = vec![0xc0, 0x05, 0xc1]; 812 | let wst = vec![0; 256]; 813 | let mut rst = vec![0; 256]; 814 | rst[0] = 0x05; 815 | rst[1] = 0x06; 816 | let state = execute_test(code); 817 | assert_eq!(wst, state.wst.st); 818 | assert_eq!(0, state.wst.p); 819 | assert_eq!(rst, state.rst.st); 820 | assert_eq!(2, state.rst.p); 821 | } 822 | 823 | #[test] 824 | fn pop() { 825 | let code = vec![0xa0, 0x12, 0x34, 0x02]; 826 | let mut wst = vec![0; 256]; 827 | wst[0] = 0x12; 828 | wst[1] = 0x34; 829 | let state = execute_test(code); 830 | assert_eq!(wst, state.wst.st); 831 | assert_eq!(1, state.wst.p); 832 | } 833 | 834 | #[test] 835 | fn nip() { 836 | let code = vec![0xa0, 0x12, 0x34, 0x03]; 837 | let mut wst = vec![0; 256]; 838 | wst[0] = 0x34; 839 | wst[1] = 0x34; 840 | let state = execute_test(code); 841 | assert_eq!(wst, state.wst.st); 842 | assert_eq!(1, state.wst.p); 843 | } 844 | 845 | #[test] 846 | fn swp() { 847 | let code = vec![0xa0, 0x12, 0x34, 0x04]; 848 | let mut wst = vec![0; 256]; 849 | wst[0] = 0x34; 850 | wst[1] = 0x12; 851 | let state = execute_test(code); 852 | assert_eq!(wst, state.wst.st); 853 | assert_eq!(2, state.wst.p); 854 | } 855 | 856 | #[test] 857 | fn add() { 858 | let code = vec![0xa0, 0x12, 0x34, 0x18]; 859 | let mut wst = vec![0; 256]; 860 | wst[0] = 0x12 + 0x34; 861 | wst[1] = 0x34; 862 | let state = execute_test(code); 863 | assert_eq!(wst, state.wst.st); 864 | assert_eq!(1, state.wst.p); 865 | } 866 | 867 | #[test] 868 | fn sub() { 869 | let code = vec![0xa0, 0x34, 0x12, 0x19]; 870 | let mut wst = vec![0; 256]; 871 | wst[0] = 0x34 - 0x12; 872 | wst[1] = 0x12; 873 | let state = execute_test(code); 874 | assert_eq!(wst, state.wst.st); 875 | assert_eq!(1, state.wst.p); 876 | } 877 | 878 | #[test] 879 | fn add2() { 880 | let code = vec![0xa0, 0x00, 0x04, 0xa0, 0x00, 0x08, 0x38]; 881 | let mut wst = vec![0; 256]; 882 | wst[0] = 0x00; 883 | wst[1] = 0x0c; 884 | wst[2] = 0x00; 885 | wst[3] = 0x08; 886 | let state = execute_test(code); 887 | assert_eq!(wst, state.wst.st); 888 | assert_eq!(2, state.wst.p); 889 | } 890 | 891 | #[test] 892 | fn rot() { 893 | let code = vec![0xa0, 0x12, 0x34, 0x80, 0x56, 0x05]; 894 | let mut wst = vec![0; 256]; 895 | wst[0] = 0x34; 896 | wst[1] = 0x56; 897 | wst[2] = 0x12; 898 | let state = execute_test(code); 899 | assert_eq!(wst, state.wst.st); 900 | assert_eq!(3, state.wst.p); 901 | } 902 | 903 | #[test] 904 | fn dup() { 905 | let code = vec![0xa0, 0x12, 0x34, 0x06]; 906 | let mut wst = vec![0; 256]; 907 | wst[0] = 0x12; 908 | wst[1] = 0x34; 909 | wst[2] = 0x34; 910 | let state = execute_test(code); 911 | assert_eq!(wst, state.wst.st); 912 | assert_eq!(3, state.wst.p); 913 | } 914 | 915 | #[test] 916 | fn ovr() { 917 | let code = vec![0xa0, 0x12, 0x34, 0x07]; 918 | let mut wst = vec![0; 256]; 919 | wst[0] = 0x12; 920 | wst[1] = 0x34; 921 | wst[2] = 0x12; 922 | let state = execute_test(code); 923 | assert_eq!(wst, state.wst.st); 924 | assert_eq!(3, state.wst.p); 925 | } 926 | 927 | #[test] 928 | fn equ() { 929 | let code = vec![0xa0, 0x12, 0x12, 0x08]; 930 | let mut wst = vec![0; 256]; 931 | wst[0] = 0x01; 932 | wst[1] = 0x12; 933 | let state = execute_test(code); 934 | assert_eq!(wst, state.wst.st); 935 | assert_eq!(1, state.wst.p); 936 | } 937 | 938 | #[test] 939 | fn equ_() { 940 | let code = vec![0xa0, 0x12, 0x13, 0x08]; 941 | let mut wst = vec![0; 256]; 942 | wst[0] = 0x00; 943 | wst[1] = 0x13; 944 | let state = execute_test(code); 945 | assert_eq!(wst, state.wst.st); 946 | assert_eq!(1, state.wst.p); 947 | } 948 | 949 | #[test] 950 | fn neq() { 951 | let code = vec![0xa0, 0x12, 0x34, 0x09]; 952 | let mut wst = vec![0; 256]; 953 | wst[0] = 0x01; 954 | wst[1] = 0x34; 955 | let state = execute_test(code); 956 | assert_eq!(wst, state.wst.st); 957 | assert_eq!(1, state.wst.p); 958 | } 959 | 960 | #[test] 961 | fn neq_() { 962 | let code = vec![0xa0, 0x12, 0x12, 0x09]; 963 | let mut wst = vec![0; 256]; 964 | wst[0] = 0x00; 965 | wst[1] = 0x12; 966 | let state = execute_test(code); 967 | assert_eq!(wst, state.wst.st); 968 | assert_eq!(1, state.wst.p); 969 | } 970 | 971 | #[test] 972 | fn gth() { 973 | let code = vec![0xa0, 0x12, 0x34, 0x0a]; 974 | let mut wst = vec![0; 256]; 975 | wst[0] = 0x00; 976 | wst[1] = 0x34; 977 | let state = execute_test(code); 978 | assert_eq!(wst, state.wst.st); 979 | assert_eq!(1, state.wst.p); 980 | } 981 | 982 | #[test] 983 | fn gth_() { 984 | let code = vec![0xa0, 0x34, 0x12, 0x0a]; 985 | let mut wst = vec![0; 256]; 986 | wst[0] = 0x01; 987 | wst[1] = 0x12; 988 | let state = execute_test(code); 989 | assert_eq!(wst, state.wst.st); 990 | assert_eq!(1, state.wst.p); 991 | } 992 | 993 | #[test] 994 | fn lth() { 995 | let code = vec![0xa0, 0x01, 0x01, 0x0b]; 996 | let mut wst = vec![0; 256]; 997 | wst[0] = 0x00; 998 | wst[1] = 0x01; 999 | let state = execute_test(code); 1000 | assert_eq!(wst, state.wst.st); 1001 | assert_eq!(1, state.wst.p); 1002 | } 1003 | 1004 | #[test] 1005 | fn lth_() { 1006 | let code = vec![0xa0, 0x01, 0x00, 0x0b]; 1007 | let mut wst = vec![0; 256]; 1008 | wst[0] = 0x01; 1009 | wst[1] = 0x00; 1010 | let state = execute_test(code); 1011 | assert_eq!(wst, state.wst.st); 1012 | assert_eq!(1, state.wst.p); 1013 | } 1014 | 1015 | #[test] 1016 | fn jmp() { 1017 | let code = vec![0xa0, 0x55, 0x34, 0x0c]; 1018 | let mut wst = vec![0; 256]; 1019 | wst[0] = 0x55; 1020 | wst[1] = 0x34; 1021 | let state = execute_test(code); 1022 | assert_eq!(wst, state.wst.st); 1023 | assert_eq!(1, state.wst.p); 1024 | assert_eq!(0x0100 + 0x04 + 0x34, state.pc); 1025 | } 1026 | 1027 | #[test] 1028 | fn jcn() { 1029 | let code = vec![0xa0, 0x01, 0x34, 0x0d]; 1030 | let mut wst = vec![0; 256]; 1031 | wst[0] = 0x01; 1032 | wst[1] = 0x34; 1033 | let state = execute_test(code); 1034 | assert_eq!(wst, state.wst.st); 1035 | assert_eq!(0, state.wst.p); 1036 | assert_eq!(0x0100 + 0x04 + 0x34, state.pc); 1037 | } 1038 | 1039 | #[test] 1040 | fn jsr() { 1041 | let code = vec![0xa0, 0x12, 0x34, 0x0e]; 1042 | let mut wst = vec![0; 256]; 1043 | wst[0] = 0x12; 1044 | wst[1] = 0x34; 1045 | let mut rst = vec![0; 256]; 1046 | rst[0] = 0x03; 1047 | let state = execute_test(code); 1048 | assert_eq!(wst, state.wst.st); 1049 | assert_eq!(1, state.wst.p); 1050 | assert_eq!(0x0100 + 0x02 + 0x34 + 0x01, state.pc); 1051 | assert_eq!(rst, state.rst.st); 1052 | } 1053 | 1054 | #[test] 1055 | fn sth() { 1056 | let code = vec![0xa0, 0x12, 0x34, 0x0f]; 1057 | let mut wst = vec![0; 256]; 1058 | wst[0] = 0x12; 1059 | wst[1] = 0x34; 1060 | let mut rst = vec![0; 256]; 1061 | rst[0] = 0x34; 1062 | let state = execute_test(code); 1063 | assert_eq!(wst, state.wst.st); 1064 | assert_eq!(1, state.wst.p); 1065 | assert_eq!(rst, state.rst.st); 1066 | } 1067 | 1068 | #[test] 1069 | fn ldz_and_stz() { 1070 | let code = vec![0xa0, 0x50, 0x00, 0x11, 0x80, 0x00, 0x10]; 1071 | let mut wst = vec![0; 256]; 1072 | wst[0] = 0x50; 1073 | let state = execute_test(code); 1074 | assert_eq!(wst, state.wst.st); 1075 | } 1076 | 1077 | #[test] 1078 | fn mul_keep() { 1079 | let code = vec![0xa0, 0x50, 0x02, 0x9a]; 1080 | let mut wst = vec![0; 256]; 1081 | wst[0] = 0x50; 1082 | wst[1] = 0x02; 1083 | wst[2] = 0xa0; 1084 | let state = execute_test(code); 1085 | assert_eq!(wst, state.wst.st); 1086 | assert_eq!(3, state.wst.p); 1087 | } 1088 | 1089 | #[test] 1090 | fn all_mul() { 1091 | let code_mul = vec![0xa0, 0x02, 0x02, 0x1a]; 1092 | let code_mul2 = vec![0xa0, 0x00, 0x02, 0xa0, 0x00, 0x02, 0x3a]; 1093 | let code_mulr = vec![0xe0, 0x02, 0x02, 0x5a]; 1094 | let code_mul2r = vec![0xe0, 0x00, 0x02, 0xe0, 0x00, 0x02, 0x7a]; 1095 | let code_mulk = vec![0xa0, 0x02, 0x02, 0x9a]; 1096 | let code_mul2k = vec![0xa0, 0x00, 0x02, 0xa0, 0x00, 0x02, 0xba]; 1097 | let code_mulkr = vec![0xe0, 0x02, 0x02, 0xda]; 1098 | let code_mul2kr = vec![0xe0, 0x00, 0x02, 0xe0, 0x00, 0x02, 0xfa]; 1099 | 1100 | let mut wst = vec![0; 256]; 1101 | wst[0] = 0x04; 1102 | wst[1] = 0x02; 1103 | let state = execute_test(code_mul); 1104 | assert_eq!(wst, state.wst.st); 1105 | assert_eq!(1, state.wst.p); 1106 | 1107 | let mut wst = vec![0; 256]; 1108 | wst[0] = 0x00; 1109 | wst[1] = 0x04; 1110 | wst[2] = 0x00; 1111 | wst[3] = 0x02; 1112 | let state = execute_test(code_mul2); 1113 | assert_eq!(wst, state.wst.st); 1114 | assert_eq!(2, state.wst.p); 1115 | 1116 | let mut rst = vec![0; 256]; 1117 | rst[0] = 0x04; 1118 | rst[1] = 0x02; 1119 | let state = execute_test(code_mulr); 1120 | assert_eq!(rst, state.rst.st); 1121 | assert_eq!(1, state.rst.p); 1122 | 1123 | let mut rst = vec![0; 256]; 1124 | rst[0] = 0x00; 1125 | rst[1] = 0x04; 1126 | rst[2] = 0x00; 1127 | rst[3] = 0x02; 1128 | let state = execute_test(code_mul2r); 1129 | assert_eq!(rst, state.rst.st); 1130 | assert_eq!(2, state.rst.p); 1131 | 1132 | let mut wst = vec![0; 256]; 1133 | wst[0] = 0x02; 1134 | wst[1] = 0x02; 1135 | wst[2] = 0x04; 1136 | let state = execute_test(code_mulk); 1137 | assert_eq!(wst, state.wst.st); 1138 | assert_eq!(3, state.wst.p); 1139 | 1140 | let mut wst = vec![0; 256]; 1141 | wst[0] = 0x00; 1142 | wst[1] = 0x02; 1143 | wst[2] = 0x00; 1144 | wst[3] = 0x02; 1145 | wst[4] = 0x00; 1146 | wst[5] = 0x04; 1147 | let state = execute_test(code_mul2k); 1148 | assert_eq!(wst, state.wst.st); 1149 | assert_eq!(6, state.wst.p); 1150 | 1151 | let mut rst = vec![0; 256]; 1152 | rst[0] = 0x02; 1153 | rst[1] = 0x02; 1154 | rst[2] = 0x04; 1155 | let state = execute_test(code_mulkr); 1156 | assert_eq!(rst, state.rst.st); 1157 | assert_eq!(3, state.rst.p); 1158 | 1159 | let mut rst = vec![0; 256]; 1160 | rst[0] = 0x00; 1161 | rst[1] = 0x02; 1162 | rst[2] = 0x00; 1163 | rst[3] = 0x02; 1164 | rst[4] = 0x00; 1165 | rst[5] = 0x04; 1166 | let state = execute_test(code_mul2kr); 1167 | assert_eq!(rst, state.rst.st); 1168 | assert_eq!(6, state.rst.p); 1169 | } 1170 | 1171 | #[test] 1172 | fn all_div() { 1173 | let code_div = vec![0xa0, 0x02, 0x02, 0x1b]; 1174 | let code_div2 = vec![0xa0, 0x00, 0x02, 0xa0, 0x00, 0x02, 0x3b]; 1175 | let code_divr = vec![0xe0, 0x02, 0x02, 0x5b]; 1176 | let code_div2r = vec![0xe0, 0x00, 0x02, 0xe0, 0x00, 0x02, 0x7b]; 1177 | let code_divk = vec![0xa0, 0x02, 0x02, 0x9b]; 1178 | let code_div2k = vec![0xa0, 0x00, 0x02, 0xa0, 0x00, 0x02, 0xbb]; 1179 | let code_divkr = vec![0xe0, 0x02, 0x02, 0xdb]; 1180 | let code_div2kr = vec![0xe0, 0x00, 0x02, 0xe0, 0x00, 0x02, 0xfb]; 1181 | 1182 | let mut wst = vec![0; 256]; 1183 | wst[0] = 0x01; 1184 | wst[1] = 0x02; 1185 | let state = execute_test(code_div); 1186 | assert_eq!(wst, state.wst.st); 1187 | assert_eq!(1, state.wst.p); 1188 | 1189 | let mut wst = vec![0; 256]; 1190 | wst[0] = 0x00; 1191 | wst[1] = 0x01; 1192 | wst[2] = 0x00; 1193 | wst[3] = 0x02; 1194 | let state = execute_test(code_div2); 1195 | assert_eq!(wst, state.wst.st); 1196 | assert_eq!(2, state.wst.p); 1197 | 1198 | let mut rst = vec![0; 256]; 1199 | rst[0] = 0x01; 1200 | rst[1] = 0x02; 1201 | let state = execute_test(code_divr); 1202 | assert_eq!(rst, state.rst.st); 1203 | assert_eq!(1, state.rst.p); 1204 | 1205 | let mut rst = vec![0; 256]; 1206 | rst[0] = 0x00; 1207 | rst[1] = 0x01; 1208 | rst[2] = 0x00; 1209 | rst[3] = 0x02; 1210 | let state = execute_test(code_div2r); 1211 | assert_eq!(rst, state.rst.st); 1212 | assert_eq!(2, state.rst.p); 1213 | 1214 | let mut wst = vec![0; 256]; 1215 | wst[0] = 0x02; 1216 | wst[1] = 0x02; 1217 | wst[2] = 0x01; 1218 | let state = execute_test(code_divk); 1219 | assert_eq!(wst, state.wst.st); 1220 | assert_eq!(3, state.wst.p); 1221 | 1222 | let mut wst = vec![0; 256]; 1223 | wst[0] = 0x00; 1224 | wst[1] = 0x02; 1225 | wst[2] = 0x00; 1226 | wst[3] = 0x02; 1227 | wst[4] = 0x00; 1228 | wst[5] = 0x01; 1229 | let state = execute_test(code_div2k); 1230 | assert_eq!(wst, state.wst.st); 1231 | assert_eq!(6, state.wst.p); 1232 | 1233 | let mut rst = vec![0; 256]; 1234 | rst[0] = 0x02; 1235 | rst[1] = 0x02; 1236 | rst[2] = 0x01; 1237 | let state = execute_test(code_divkr); 1238 | assert_eq!(rst, state.rst.st); 1239 | assert_eq!(3, state.rst.p); 1240 | 1241 | let mut rst = vec![0; 256]; 1242 | rst[0] = 0x00; 1243 | rst[1] = 0x02; 1244 | rst[2] = 0x00; 1245 | rst[3] = 0x02; 1246 | rst[4] = 0x00; 1247 | rst[5] = 0x01; 1248 | let state = execute_test(code_div2kr); 1249 | assert_eq!(rst, state.rst.st); 1250 | assert_eq!(6, state.rst.p); 1251 | } 1252 | 1253 | #[test] 1254 | fn and() { 1255 | let code = vec![0xa0, 0xf0, 0x0f, 0x1c]; 1256 | let mut wst = vec![0; 256]; 1257 | wst[0] = 0x00; 1258 | wst[1] = 0x0f; 1259 | let state = execute_test(code); 1260 | assert_eq!(wst, state.wst.st); 1261 | assert_eq!(1, state.wst.p); 1262 | } 1263 | 1264 | #[test] 1265 | fn ora_keep() { 1266 | let code = vec![0xa0, 0xf0, 0xff, 0x9d]; 1267 | let mut wst = vec![0; 256]; 1268 | wst[0] = 0xf0; 1269 | wst[1] = 0xff; 1270 | wst[2] = 0xff; 1271 | let state = execute_test(code); 1272 | assert_eq!(wst, state.wst.st); 1273 | assert_eq!(3, state.wst.p); 1274 | } 1275 | 1276 | #[test] 1277 | fn eor_keep() { 1278 | let code = vec![0xa0, 0xf0, 0xff, 0x9e]; 1279 | let mut wst = vec![0; 256]; 1280 | wst[0] = 0xf0; 1281 | wst[1] = 0xff; 1282 | wst[2] = 0x0f; 1283 | let state = execute_test(code); 1284 | assert_eq!(wst, state.wst.st); 1285 | assert_eq!(3, state.wst.p); 1286 | } 1287 | 1288 | #[test] 1289 | fn sft() { 1290 | let code = vec![0xa0, 0x34, 0x10, 0x1f]; 1291 | let mut wst = vec![0; 256]; 1292 | wst[0] = 0x68; 1293 | wst[1] = 0x10; 1294 | let state = execute_test(code); 1295 | assert_eq!(wst, state.wst.st); 1296 | assert_eq!(1, state.wst.p); 1297 | 1298 | let code = vec![0xa0, 0x34, 0x01, 0x1f]; 1299 | let mut wst = vec![0; 256]; 1300 | wst[0] = 0x1a; 1301 | wst[1] = 0x01; 1302 | let state = execute_test(code); 1303 | assert_eq!(wst, state.wst.st); 1304 | assert_eq!(1, state.wst.p); 1305 | 1306 | let code = vec![0xa0, 0x34, 0x33, 0x9f]; 1307 | let mut wst = vec![0; 256]; 1308 | wst[0] = 0x34; 1309 | wst[1] = 0x33; 1310 | wst[2] = 0x30; 1311 | let state = execute_test(code); 1312 | assert_eq!(wst, state.wst.st); 1313 | assert_eq!(3, state.wst.p); 1314 | 1315 | let code = vec![0xa0, 0x12, 0x48, 0x80, 0x34, 0xbf]; 1316 | let mut wst = vec![0; 256]; 1317 | wst[0] = 0x12; 1318 | wst[1] = 0x48; 1319 | wst[2] = 0x34; 1320 | wst[3] = 0x09; 1321 | wst[4] = 0x20; 1322 | let state = execute_test(code); 1323 | assert_eq!(wst, state.wst.st); 1324 | assert_eq!(5, state.wst.p); 1325 | } 1326 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "ab_glyph" 7 | version = "0.2.16" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "846ffacb9d0c8b879ef9e565b59e18fb76d6a61013e5bd24ecc659864e6b1a1f" 10 | dependencies = [ 11 | "ab_glyph_rasterizer", 12 | "owned_ttf_parser", 13 | ] 14 | 15 | [[package]] 16 | name = "ab_glyph_rasterizer" 17 | version = "0.1.5" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "a13739d7177fbd22bb0ed28badfff9f372f8bef46c863db4e1c6248f6b223b6e" 20 | 21 | [[package]] 22 | name = "adler" 23 | version = "1.0.2" 24 | source = "registry+https://github.com/rust-lang/crates.io-index" 25 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 26 | 27 | [[package]] 28 | name = "ahash" 29 | version = "0.7.6" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 32 | dependencies = [ 33 | "getrandom", 34 | "once_cell", 35 | "version_check", 36 | ] 37 | 38 | [[package]] 39 | name = "alsa" 40 | version = "0.6.0" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" 43 | dependencies = [ 44 | "alsa-sys", 45 | "bitflags", 46 | "libc", 47 | "nix 0.23.1", 48 | ] 49 | 50 | [[package]] 51 | name = "alsa-sys" 52 | version = "0.3.1" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" 55 | dependencies = [ 56 | "libc", 57 | "pkg-config", 58 | ] 59 | 60 | [[package]] 61 | name = "android_system_properties" 62 | version = "0.1.5" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 65 | dependencies = [ 66 | "libc", 67 | ] 68 | 69 | [[package]] 70 | name = "approx" 71 | version = "0.5.1" 72 | source = "registry+https://github.com/rust-lang/crates.io-index" 73 | checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" 74 | dependencies = [ 75 | "num-traits", 76 | ] 77 | 78 | [[package]] 79 | name = "arrayref" 80 | version = "0.3.6" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" 83 | 84 | [[package]] 85 | name = "arrayvec" 86 | version = "0.5.2" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 89 | 90 | [[package]] 91 | name = "arrayvec" 92 | version = "0.7.2" 93 | source = "registry+https://github.com/rust-lang/crates.io-index" 94 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 95 | 96 | [[package]] 97 | name = "ash" 98 | version = "0.37.0+1.3.209" 99 | source = "registry+https://github.com/rust-lang/crates.io-index" 100 | checksum = "006ca68e0f2b03f22d6fa9f2860f85aed430d257fec20f8879b2145e7c7ae1a6" 101 | dependencies = [ 102 | "libloading", 103 | ] 104 | 105 | [[package]] 106 | name = "autocfg" 107 | version = "1.1.0" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 110 | 111 | [[package]] 112 | name = "base-x" 113 | version = "0.2.11" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 116 | 117 | [[package]] 118 | name = "bindgen" 119 | version = "0.59.2" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" 122 | dependencies = [ 123 | "bitflags", 124 | "cexpr", 125 | "clang-sys", 126 | "lazy_static", 127 | "lazycell", 128 | "peeking_take_while", 129 | "proc-macro2", 130 | "quote", 131 | "regex", 132 | "rustc-hash", 133 | "shlex", 134 | ] 135 | 136 | [[package]] 137 | name = "bit-set" 138 | version = "0.5.3" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 141 | dependencies = [ 142 | "bit-vec", 143 | ] 144 | 145 | [[package]] 146 | name = "bit-vec" 147 | version = "0.6.3" 148 | source = "registry+https://github.com/rust-lang/crates.io-index" 149 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 150 | 151 | [[package]] 152 | name = "bitflags" 153 | version = "1.3.2" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 156 | 157 | [[package]] 158 | name = "block" 159 | version = "0.1.6" 160 | source = "registry+https://github.com/rust-lang/crates.io-index" 161 | checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" 162 | 163 | [[package]] 164 | name = "bumpalo" 165 | version = "3.11.0" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" 168 | 169 | [[package]] 170 | name = "bytecount" 171 | version = "0.6.3" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" 174 | 175 | [[package]] 176 | name = "bytemuck" 177 | version = "1.12.1" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" 180 | dependencies = [ 181 | "bytemuck_derive", 182 | ] 183 | 184 | [[package]] 185 | name = "bytemuck_derive" 186 | version = "1.2.1" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "1b9e1f5fa78f69496407a27ae9ed989e3c3b072310286f5ef385525e4cbc24a9" 189 | dependencies = [ 190 | "proc-macro2", 191 | "quote", 192 | "syn", 193 | ] 194 | 195 | [[package]] 196 | name = "byteorder" 197 | version = "1.4.3" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 200 | 201 | [[package]] 202 | name = "bytes" 203 | version = "1.2.1" 204 | source = "registry+https://github.com/rust-lang/crates.io-index" 205 | checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" 206 | 207 | [[package]] 208 | name = "bzip2" 209 | version = "0.4.3" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" 212 | dependencies = [ 213 | "bzip2-sys", 214 | "libc", 215 | ] 216 | 217 | [[package]] 218 | name = "bzip2-sys" 219 | version = "0.1.11+1.0.8" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" 222 | dependencies = [ 223 | "cc", 224 | "libc", 225 | "pkg-config", 226 | ] 227 | 228 | [[package]] 229 | name = "calloop" 230 | version = "0.10.1" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" 233 | dependencies = [ 234 | "log", 235 | "nix 0.24.2", 236 | "slotmap", 237 | "thiserror", 238 | "vec_map", 239 | ] 240 | 241 | [[package]] 242 | name = "camino" 243 | version = "1.1.1" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" 246 | dependencies = [ 247 | "serde", 248 | ] 249 | 250 | [[package]] 251 | name = "cargo-platform" 252 | version = "0.1.2" 253 | source = "registry+https://github.com/rust-lang/crates.io-index" 254 | checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" 255 | dependencies = [ 256 | "serde", 257 | ] 258 | 259 | [[package]] 260 | name = "cargo_metadata" 261 | version = "0.14.2" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" 264 | dependencies = [ 265 | "camino", 266 | "cargo-platform", 267 | "semver 1.0.13", 268 | "serde", 269 | "serde_json", 270 | ] 271 | 272 | [[package]] 273 | name = "cc" 274 | version = "1.0.73" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 277 | dependencies = [ 278 | "jobserver", 279 | ] 280 | 281 | [[package]] 282 | name = "cesu8" 283 | version = "1.1.0" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" 286 | 287 | [[package]] 288 | name = "cexpr" 289 | version = "0.6.0" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 292 | dependencies = [ 293 | "nom", 294 | ] 295 | 296 | [[package]] 297 | name = "cfg-if" 298 | version = "1.0.0" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 301 | 302 | [[package]] 303 | name = "cfg_aliases" 304 | version = "0.1.1" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" 307 | 308 | [[package]] 309 | name = "clang-sys" 310 | version = "1.3.3" 311 | source = "registry+https://github.com/rust-lang/crates.io-index" 312 | checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" 313 | dependencies = [ 314 | "glob", 315 | "libc", 316 | "libloading", 317 | ] 318 | 319 | [[package]] 320 | name = "claxon" 321 | version = "0.4.3" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688" 324 | 325 | [[package]] 326 | name = "cmake" 327 | version = "0.1.49" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" 330 | dependencies = [ 331 | "cc", 332 | ] 333 | 334 | [[package]] 335 | name = "cocoa" 336 | version = "0.24.0" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "6f63902e9223530efb4e26ccd0cf55ec30d592d3b42e21a28defc42a9586e832" 339 | dependencies = [ 340 | "bitflags", 341 | "block", 342 | "cocoa-foundation", 343 | "core-foundation", 344 | "core-graphics", 345 | "foreign-types 0.3.2", 346 | "libc", 347 | "objc", 348 | ] 349 | 350 | [[package]] 351 | name = "cocoa-foundation" 352 | version = "0.1.0" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" 355 | dependencies = [ 356 | "bitflags", 357 | "block", 358 | "core-foundation", 359 | "core-graphics-types", 360 | "foreign-types 0.3.2", 361 | "libc", 362 | "objc", 363 | ] 364 | 365 | [[package]] 366 | name = "codespan-reporting" 367 | version = "0.11.1" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 370 | dependencies = [ 371 | "termcolor", 372 | "unicode-width", 373 | ] 374 | 375 | [[package]] 376 | name = "color_quant" 377 | version = "1.1.0" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 380 | 381 | [[package]] 382 | name = "combine" 383 | version = "4.6.6" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" 386 | dependencies = [ 387 | "bytes", 388 | "memchr", 389 | ] 390 | 391 | [[package]] 392 | name = "core-foundation" 393 | version = "0.9.3" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 396 | dependencies = [ 397 | "core-foundation-sys", 398 | "libc", 399 | ] 400 | 401 | [[package]] 402 | name = "core-foundation-sys" 403 | version = "0.8.3" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 406 | 407 | [[package]] 408 | name = "core-graphics" 409 | version = "0.22.3" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" 412 | dependencies = [ 413 | "bitflags", 414 | "core-foundation", 415 | "core-graphics-types", 416 | "foreign-types 0.3.2", 417 | "libc", 418 | ] 419 | 420 | [[package]] 421 | name = "core-graphics-types" 422 | version = "0.1.1" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" 425 | dependencies = [ 426 | "bitflags", 427 | "core-foundation", 428 | "foreign-types 0.3.2", 429 | "libc", 430 | ] 431 | 432 | [[package]] 433 | name = "core-text" 434 | version = "19.2.0" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | checksum = "99d74ada66e07c1cefa18f8abfba765b486f250de2e4a999e5727fc0dd4b4a25" 437 | dependencies = [ 438 | "core-foundation", 439 | "core-graphics", 440 | "foreign-types 0.3.2", 441 | "libc", 442 | ] 443 | 444 | [[package]] 445 | name = "coreaudio-rs" 446 | version = "0.10.0" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" 449 | dependencies = [ 450 | "bitflags", 451 | "coreaudio-sys", 452 | ] 453 | 454 | [[package]] 455 | name = "coreaudio-sys" 456 | version = "0.2.10" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "3dff444d80630d7073077d38d40b4501fd518bd2b922c2a55edcc8b0f7be57e6" 459 | dependencies = [ 460 | "bindgen", 461 | ] 462 | 463 | [[package]] 464 | name = "cpal" 465 | version = "0.14.1" 466 | source = "registry+https://github.com/rust-lang/crates.io-index" 467 | checksum = "e73413ddcb69c398125f5529714492e070c64c6a090ad5b01d8c082b320a0809" 468 | dependencies = [ 469 | "alsa", 470 | "core-foundation-sys", 471 | "coreaudio-rs", 472 | "jni", 473 | "js-sys", 474 | "libc", 475 | "mach", 476 | "ndk 0.7.0", 477 | "ndk-context", 478 | "nix 0.25.0", 479 | "oboe", 480 | "once_cell", 481 | "parking_lot 0.12.1", 482 | "stdweb", 483 | "thiserror", 484 | "web-sys", 485 | "windows", 486 | ] 487 | 488 | [[package]] 489 | name = "crc32fast" 490 | version = "1.3.2" 491 | source = "registry+https://github.com/rust-lang/crates.io-index" 492 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 493 | dependencies = [ 494 | "cfg-if", 495 | ] 496 | 497 | [[package]] 498 | name = "crevice" 499 | version = "0.11.0" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | checksum = "5a843181f42b85f7b5c7742c95aeff6f3a35416d8e760158e219c6bb993248d3" 502 | dependencies = [ 503 | "bytemuck", 504 | "crevice-derive", 505 | "mint", 506 | ] 507 | 508 | [[package]] 509 | name = "crevice-derive" 510 | version = "0.10.0" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "2320c07ceb3e491e2bd09ade90a91c29a42d9553f1bde60c945cb5c34958b26e" 513 | dependencies = [ 514 | "proc-macro2", 515 | "quote", 516 | "syn", 517 | ] 518 | 519 | [[package]] 520 | name = "crossbeam-channel" 521 | version = "0.5.6" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" 524 | dependencies = [ 525 | "cfg-if", 526 | "crossbeam-utils", 527 | ] 528 | 529 | [[package]] 530 | name = "crossbeam-deque" 531 | version = "0.8.2" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" 534 | dependencies = [ 535 | "cfg-if", 536 | "crossbeam-epoch", 537 | "crossbeam-utils", 538 | ] 539 | 540 | [[package]] 541 | name = "crossbeam-epoch" 542 | version = "0.9.10" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" 545 | dependencies = [ 546 | "autocfg", 547 | "cfg-if", 548 | "crossbeam-utils", 549 | "memoffset 0.6.5", 550 | "once_cell", 551 | "scopeguard", 552 | ] 553 | 554 | [[package]] 555 | name = "crossbeam-utils" 556 | version = "0.8.11" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" 559 | dependencies = [ 560 | "cfg-if", 561 | "once_cell", 562 | ] 563 | 564 | [[package]] 565 | name = "crossfont" 566 | version = "0.5.1" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "21fd3add36ea31aba1520aa5288714dd63be506106753226d0eb387a93bc9c45" 569 | dependencies = [ 570 | "cocoa", 571 | "core-foundation", 572 | "core-foundation-sys", 573 | "core-graphics", 574 | "core-text", 575 | "dwrote", 576 | "foreign-types 0.5.0", 577 | "freetype-rs", 578 | "libc", 579 | "log", 580 | "objc", 581 | "once_cell", 582 | "pkg-config", 583 | "servo-fontconfig", 584 | "winapi", 585 | ] 586 | 587 | [[package]] 588 | name = "cty" 589 | version = "0.2.2" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" 592 | 593 | [[package]] 594 | name = "d3d12" 595 | version = "0.5.0" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "827914e1f53b1e0e025ecd3d967a7836b7bcb54520f90e21ef8df7b4d88a2759" 598 | dependencies = [ 599 | "bitflags", 600 | "libloading", 601 | "winapi", 602 | ] 603 | 604 | [[package]] 605 | name = "darling" 606 | version = "0.13.4" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" 609 | dependencies = [ 610 | "darling_core", 611 | "darling_macro", 612 | ] 613 | 614 | [[package]] 615 | name = "darling_core" 616 | version = "0.13.4" 617 | source = "registry+https://github.com/rust-lang/crates.io-index" 618 | checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" 619 | dependencies = [ 620 | "fnv", 621 | "ident_case", 622 | "proc-macro2", 623 | "quote", 624 | "strsim", 625 | "syn", 626 | ] 627 | 628 | [[package]] 629 | name = "darling_macro" 630 | version = "0.13.4" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" 633 | dependencies = [ 634 | "darling_core", 635 | "quote", 636 | "syn", 637 | ] 638 | 639 | [[package]] 640 | name = "directories" 641 | version = "4.0.1" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "f51c5d4ddabd36886dd3e1438cb358cdcb0d7c499cb99cb4ac2e38e18b5cb210" 644 | dependencies = [ 645 | "dirs-sys", 646 | ] 647 | 648 | [[package]] 649 | name = "dirs-sys" 650 | version = "0.3.7" 651 | source = "registry+https://github.com/rust-lang/crates.io-index" 652 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 653 | dependencies = [ 654 | "libc", 655 | "redox_users", 656 | "winapi", 657 | ] 658 | 659 | [[package]] 660 | name = "discard" 661 | version = "1.0.4" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 664 | 665 | [[package]] 666 | name = "dispatch" 667 | version = "0.2.0" 668 | source = "registry+https://github.com/rust-lang/crates.io-index" 669 | checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" 670 | 671 | [[package]] 672 | name = "dlib" 673 | version = "0.5.0" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" 676 | dependencies = [ 677 | "libloading", 678 | ] 679 | 680 | [[package]] 681 | name = "downcast-rs" 682 | version = "1.2.0" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" 685 | 686 | [[package]] 687 | name = "dwrote" 688 | version = "0.11.0" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "439a1c2ba5611ad3ed731280541d36d2e9c4ac5e7fb818a27b604bdc5a6aa65b" 691 | dependencies = [ 692 | "lazy_static", 693 | "libc", 694 | "serde", 695 | "serde_derive", 696 | "winapi", 697 | "wio", 698 | ] 699 | 700 | [[package]] 701 | name = "either" 702 | version = "1.8.0" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" 705 | 706 | [[package]] 707 | name = "eresma" 708 | version = "0.1.0" 709 | dependencies = [ 710 | "ggez", 711 | "num_enum", 712 | ] 713 | 714 | [[package]] 715 | name = "error-chain" 716 | version = "0.12.4" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" 719 | dependencies = [ 720 | "version_check", 721 | ] 722 | 723 | [[package]] 724 | name = "euclid" 725 | version = "0.22.7" 726 | source = "registry+https://github.com/rust-lang/crates.io-index" 727 | checksum = "b52c2ef4a78da0ba68fbe1fd920627411096d2ac478f7f4c9f3a54ba6705bade" 728 | dependencies = [ 729 | "num-traits", 730 | ] 731 | 732 | [[package]] 733 | name = "expat-sys" 734 | version = "2.1.6" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "658f19728920138342f68408b7cf7644d90d4784353d8ebc32e7e8663dbe45fa" 737 | dependencies = [ 738 | "cmake", 739 | "pkg-config", 740 | ] 741 | 742 | [[package]] 743 | name = "fastrand" 744 | version = "1.8.0" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" 747 | dependencies = [ 748 | "instant", 749 | ] 750 | 751 | [[package]] 752 | name = "flate2" 753 | version = "1.0.24" 754 | source = "registry+https://github.com/rust-lang/crates.io-index" 755 | checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" 756 | dependencies = [ 757 | "crc32fast", 758 | "miniz_oxide 0.5.4", 759 | ] 760 | 761 | [[package]] 762 | name = "float_next_after" 763 | version = "0.1.5" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "4fc612c5837986b7104a87a0df74a5460931f1c5274be12f8d0f40aa2f30d632" 766 | dependencies = [ 767 | "num-traits", 768 | ] 769 | 770 | [[package]] 771 | name = "fnv" 772 | version = "1.0.7" 773 | source = "registry+https://github.com/rust-lang/crates.io-index" 774 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 775 | 776 | [[package]] 777 | name = "foreign-types" 778 | version = "0.3.2" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 781 | dependencies = [ 782 | "foreign-types-shared 0.1.1", 783 | ] 784 | 785 | [[package]] 786 | name = "foreign-types" 787 | version = "0.5.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" 790 | dependencies = [ 791 | "foreign-types-macros", 792 | "foreign-types-shared 0.3.1", 793 | ] 794 | 795 | [[package]] 796 | name = "foreign-types-macros" 797 | version = "0.2.2" 798 | source = "registry+https://github.com/rust-lang/crates.io-index" 799 | checksum = "c8469d0d40519bc608ec6863f1cc88f3f1deee15913f2f3b3e573d81ed38cccc" 800 | dependencies = [ 801 | "proc-macro2", 802 | "quote", 803 | "syn", 804 | ] 805 | 806 | [[package]] 807 | name = "foreign-types-shared" 808 | version = "0.1.1" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 811 | 812 | [[package]] 813 | name = "foreign-types-shared" 814 | version = "0.3.1" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" 817 | 818 | [[package]] 819 | name = "freetype-rs" 820 | version = "0.26.0" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "74eadec9d0a5c28c54bb9882e54787275152a4e36ce206b45d7451384e5bf5fb" 823 | dependencies = [ 824 | "bitflags", 825 | "freetype-sys", 826 | "libc", 827 | ] 828 | 829 | [[package]] 830 | name = "freetype-sys" 831 | version = "0.13.1" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | checksum = "a37d4011c0cc628dfa766fcc195454f4b068d7afdc2adfd28861191d866e731a" 834 | dependencies = [ 835 | "cmake", 836 | "libc", 837 | "pkg-config", 838 | ] 839 | 840 | [[package]] 841 | name = "fxhash" 842 | version = "0.2.1" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" 845 | dependencies = [ 846 | "byteorder", 847 | ] 848 | 849 | [[package]] 850 | name = "getrandom" 851 | version = "0.2.7" 852 | source = "registry+https://github.com/rust-lang/crates.io-index" 853 | checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" 854 | dependencies = [ 855 | "cfg-if", 856 | "libc", 857 | "wasi", 858 | ] 859 | 860 | [[package]] 861 | name = "ggez" 862 | version = "0.8.1" 863 | source = "registry+https://github.com/rust-lang/crates.io-index" 864 | checksum = "9b5afdff588614f146cddaabe68ee21de08947594c7a7329aad0a0563f848552" 865 | dependencies = [ 866 | "approx", 867 | "bitflags", 868 | "bytemuck", 869 | "crevice", 870 | "directories", 871 | "gilrs", 872 | "glam", 873 | "glyph_brush", 874 | "image", 875 | "log", 876 | "lyon", 877 | "memoffset 0.7.1", 878 | "mint", 879 | "ordered-float", 880 | "pollster", 881 | "rodio", 882 | "serde", 883 | "skeptic", 884 | "smart-default", 885 | "toml", 886 | "typed-arena", 887 | "wgpu", 888 | "winit", 889 | "zip", 890 | ] 891 | 892 | [[package]] 893 | name = "gif" 894 | version = "0.11.4" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" 897 | dependencies = [ 898 | "color_quant", 899 | "weezl", 900 | ] 901 | 902 | [[package]] 903 | name = "gilrs" 904 | version = "0.9.0" 905 | source = "registry+https://github.com/rust-lang/crates.io-index" 906 | checksum = "1d6ba7c37bf8ea7ba0c3e3795dfa1a7771b1e47c4bb417c4d27c7b338d79685f" 907 | dependencies = [ 908 | "fnv", 909 | "gilrs-core", 910 | "log", 911 | "uuid", 912 | "vec_map", 913 | ] 914 | 915 | [[package]] 916 | name = "gilrs-core" 917 | version = "0.4.1" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "96a8d94a7fc5afd27e894e08a4cfe5a49237f85bcc7140e90721bad3399c7d02" 920 | dependencies = [ 921 | "core-foundation", 922 | "io-kit-sys", 923 | "js-sys", 924 | "libc", 925 | "libudev-sys", 926 | "log", 927 | "nix 0.24.2", 928 | "rusty-xinput", 929 | "uuid", 930 | "vec_map", 931 | "wasm-bindgen", 932 | "web-sys", 933 | "winapi", 934 | ] 935 | 936 | [[package]] 937 | name = "glam" 938 | version = "0.21.3" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "518faa5064866338b013ff9b2350dc318e14cc4fcd6cb8206d7e7c9886c98815" 941 | dependencies = [ 942 | "mint", 943 | ] 944 | 945 | [[package]] 946 | name = "glob" 947 | version = "0.3.0" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 950 | 951 | [[package]] 952 | name = "glow" 953 | version = "0.11.2" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "d8bd5877156a19b8ac83a29b2306fe20537429d318f3ff0a1a2119f8d9c61919" 956 | dependencies = [ 957 | "js-sys", 958 | "slotmap", 959 | "wasm-bindgen", 960 | "web-sys", 961 | ] 962 | 963 | [[package]] 964 | name = "glyph_brush" 965 | version = "0.7.5" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "ac02497410cdb5062cc056a33f2e1e19ff69fbf26a4be9a02bf29d6e17ea105b" 968 | dependencies = [ 969 | "glyph_brush_draw_cache", 970 | "glyph_brush_layout", 971 | "log", 972 | "ordered-float", 973 | "rustc-hash", 974 | "twox-hash", 975 | ] 976 | 977 | [[package]] 978 | name = "glyph_brush_draw_cache" 979 | version = "0.1.5" 980 | source = "registry+https://github.com/rust-lang/crates.io-index" 981 | checksum = "6010675390f6889e09a21e2c8b575b3ee25667ea8237a8d59423f73cb8c28610" 982 | dependencies = [ 983 | "ab_glyph", 984 | "crossbeam-channel", 985 | "crossbeam-deque", 986 | "linked-hash-map", 987 | "rayon", 988 | "rustc-hash", 989 | ] 990 | 991 | [[package]] 992 | name = "glyph_brush_layout" 993 | version = "0.2.3" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "cc32c2334f00ca5ac3695c5009ae35da21da8c62d255b5b96d56e2597a637a38" 996 | dependencies = [ 997 | "ab_glyph", 998 | "approx", 999 | "xi-unicode", 1000 | ] 1001 | 1002 | [[package]] 1003 | name = "gpu-alloc" 1004 | version = "0.5.3" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "7fc59e5f710e310e76e6707f86c561dd646f69a8876da9131703b2f717de818d" 1007 | dependencies = [ 1008 | "bitflags", 1009 | "gpu-alloc-types", 1010 | ] 1011 | 1012 | [[package]] 1013 | name = "gpu-alloc-types" 1014 | version = "0.2.0" 1015 | source = "registry+https://github.com/rust-lang/crates.io-index" 1016 | checksum = "54804d0d6bc9d7f26db4eaec1ad10def69b599315f487d32c334a80d1efe67a5" 1017 | dependencies = [ 1018 | "bitflags", 1019 | ] 1020 | 1021 | [[package]] 1022 | name = "gpu-descriptor" 1023 | version = "0.2.3" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "0b0c02e1ba0bdb14e965058ca34e09c020f8e507a760df1121728e0aef68d57a" 1026 | dependencies = [ 1027 | "bitflags", 1028 | "gpu-descriptor-types", 1029 | "hashbrown", 1030 | ] 1031 | 1032 | [[package]] 1033 | name = "gpu-descriptor-types" 1034 | version = "0.1.1" 1035 | source = "registry+https://github.com/rust-lang/crates.io-index" 1036 | checksum = "363e3677e55ad168fef68cf9de3a4a310b53124c5e784c53a1d70e92d23f2126" 1037 | dependencies = [ 1038 | "bitflags", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "hashbrown" 1043 | version = "0.12.3" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1046 | dependencies = [ 1047 | "ahash", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "hermit-abi" 1052 | version = "0.1.19" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1055 | dependencies = [ 1056 | "libc", 1057 | ] 1058 | 1059 | [[package]] 1060 | name = "hexf-parse" 1061 | version = "0.2.1" 1062 | source = "registry+https://github.com/rust-lang/crates.io-index" 1063 | checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" 1064 | 1065 | [[package]] 1066 | name = "hound" 1067 | version = "3.4.0" 1068 | source = "registry+https://github.com/rust-lang/crates.io-index" 1069 | checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" 1070 | 1071 | [[package]] 1072 | name = "ident_case" 1073 | version = "1.0.1" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1076 | 1077 | [[package]] 1078 | name = "image" 1079 | version = "0.24.4" 1080 | source = "registry+https://github.com/rust-lang/crates.io-index" 1081 | checksum = "bd8e4fb07cf672b1642304e731ef8a6a4c7891d67bb4fd4f5ce58cd6ed86803c" 1082 | dependencies = [ 1083 | "bytemuck", 1084 | "byteorder", 1085 | "color_quant", 1086 | "gif", 1087 | "num-rational", 1088 | "num-traits", 1089 | "png", 1090 | "tiff", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "indexmap" 1095 | version = "1.9.1" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" 1098 | dependencies = [ 1099 | "autocfg", 1100 | "hashbrown", 1101 | ] 1102 | 1103 | [[package]] 1104 | name = "instant" 1105 | version = "0.1.12" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1108 | dependencies = [ 1109 | "cfg-if", 1110 | "js-sys", 1111 | "wasm-bindgen", 1112 | "web-sys", 1113 | ] 1114 | 1115 | [[package]] 1116 | name = "io-kit-sys" 1117 | version = "0.2.0" 1118 | source = "registry+https://github.com/rust-lang/crates.io-index" 1119 | checksum = "7789f7f3c9686f96164f5109d69152de759e76e284f736bd57661c6df5091919" 1120 | dependencies = [ 1121 | "core-foundation-sys", 1122 | "mach", 1123 | ] 1124 | 1125 | [[package]] 1126 | name = "itoa" 1127 | version = "1.0.3" 1128 | source = "registry+https://github.com/rust-lang/crates.io-index" 1129 | checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" 1130 | 1131 | [[package]] 1132 | name = "jni" 1133 | version = "0.19.0" 1134 | source = "registry+https://github.com/rust-lang/crates.io-index" 1135 | checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" 1136 | dependencies = [ 1137 | "cesu8", 1138 | "combine", 1139 | "jni-sys", 1140 | "log", 1141 | "thiserror", 1142 | "walkdir", 1143 | ] 1144 | 1145 | [[package]] 1146 | name = "jni-sys" 1147 | version = "0.3.0" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" 1150 | 1151 | [[package]] 1152 | name = "jobserver" 1153 | version = "0.1.24" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" 1156 | dependencies = [ 1157 | "libc", 1158 | ] 1159 | 1160 | [[package]] 1161 | name = "jpeg-decoder" 1162 | version = "0.2.6" 1163 | source = "registry+https://github.com/rust-lang/crates.io-index" 1164 | checksum = "9478aa10f73e7528198d75109c8be5cd7d15fb530238040148d5f9a22d4c5b3b" 1165 | 1166 | [[package]] 1167 | name = "js-sys" 1168 | version = "0.3.60" 1169 | source = "registry+https://github.com/rust-lang/crates.io-index" 1170 | checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" 1171 | dependencies = [ 1172 | "wasm-bindgen", 1173 | ] 1174 | 1175 | [[package]] 1176 | name = "khronos-egl" 1177 | version = "4.1.0" 1178 | source = "registry+https://github.com/rust-lang/crates.io-index" 1179 | checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" 1180 | dependencies = [ 1181 | "libc", 1182 | "libloading", 1183 | "pkg-config", 1184 | ] 1185 | 1186 | [[package]] 1187 | name = "lazy_static" 1188 | version = "1.4.0" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1191 | 1192 | [[package]] 1193 | name = "lazycell" 1194 | version = "1.3.0" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" 1197 | 1198 | [[package]] 1199 | name = "lewton" 1200 | version = "0.10.2" 1201 | source = "registry+https://github.com/rust-lang/crates.io-index" 1202 | checksum = "777b48df9aaab155475a83a7df3070395ea1ac6902f5cd062b8f2b028075c030" 1203 | dependencies = [ 1204 | "byteorder", 1205 | "ogg", 1206 | "tinyvec", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "libc" 1211 | version = "0.2.132" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" 1214 | 1215 | [[package]] 1216 | name = "libloading" 1217 | version = "0.7.3" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" 1220 | dependencies = [ 1221 | "cfg-if", 1222 | "winapi", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "libudev-sys" 1227 | version = "0.1.4" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" 1230 | dependencies = [ 1231 | "libc", 1232 | "pkg-config", 1233 | ] 1234 | 1235 | [[package]] 1236 | name = "linked-hash-map" 1237 | version = "0.5.6" 1238 | source = "registry+https://github.com/rust-lang/crates.io-index" 1239 | checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1240 | 1241 | [[package]] 1242 | name = "lock_api" 1243 | version = "0.4.8" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" 1246 | dependencies = [ 1247 | "autocfg", 1248 | "scopeguard", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "log" 1253 | version = "0.4.17" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1256 | dependencies = [ 1257 | "cfg-if", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "lyon" 1262 | version = "1.0.0" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "4a7d11c00fe6fa46f8ac8455ddcdf262b523de3c7bdfaf15b727db717c834c59" 1265 | dependencies = [ 1266 | "lyon_algorithms", 1267 | "lyon_tessellation", 1268 | ] 1269 | 1270 | [[package]] 1271 | name = "lyon_algorithms" 1272 | version = "1.0.1" 1273 | source = "registry+https://github.com/rust-lang/crates.io-index" 1274 | checksum = "6d53c2fefbc729e3c206d53d0cc7ccf90d3d31614f32e329f7e042d55e6b0573" 1275 | dependencies = [ 1276 | "lyon_path", 1277 | ] 1278 | 1279 | [[package]] 1280 | name = "lyon_geom" 1281 | version = "1.0.1" 1282 | source = "registry+https://github.com/rust-lang/crates.io-index" 1283 | checksum = "bd652c7370a873d62408f377f10333ff377956e0401759d854643de3af228d4f" 1284 | dependencies = [ 1285 | "arrayvec 0.7.2", 1286 | "euclid", 1287 | "num-traits", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "lyon_path" 1292 | version = "1.0.1" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "898d82012beaa3239a53e96360d93fda51f4e3b449672944982727020572ef09" 1295 | dependencies = [ 1296 | "lyon_geom", 1297 | ] 1298 | 1299 | [[package]] 1300 | name = "lyon_tessellation" 1301 | version = "1.0.4" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "374efef3047dc01cc86b32058d1dd0f675aba80d3d63df82cdeb160c69c4e903" 1304 | dependencies = [ 1305 | "float_next_after", 1306 | "lyon_path", 1307 | "thiserror", 1308 | ] 1309 | 1310 | [[package]] 1311 | name = "mach" 1312 | version = "0.3.2" 1313 | source = "registry+https://github.com/rust-lang/crates.io-index" 1314 | checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" 1315 | dependencies = [ 1316 | "libc", 1317 | ] 1318 | 1319 | [[package]] 1320 | name = "malloc_buf" 1321 | version = "0.0.6" 1322 | source = "registry+https://github.com/rust-lang/crates.io-index" 1323 | checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" 1324 | dependencies = [ 1325 | "libc", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "memchr" 1330 | version = "2.5.0" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" 1333 | 1334 | [[package]] 1335 | name = "memmap2" 1336 | version = "0.5.7" 1337 | source = "registry+https://github.com/rust-lang/crates.io-index" 1338 | checksum = "95af15f345b17af2efc8ead6080fb8bc376f8cec1b35277b935637595fe77498" 1339 | dependencies = [ 1340 | "libc", 1341 | ] 1342 | 1343 | [[package]] 1344 | name = "memoffset" 1345 | version = "0.6.5" 1346 | source = "registry+https://github.com/rust-lang/crates.io-index" 1347 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" 1348 | dependencies = [ 1349 | "autocfg", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "memoffset" 1354 | version = "0.7.1" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" 1357 | dependencies = [ 1358 | "autocfg", 1359 | ] 1360 | 1361 | [[package]] 1362 | name = "metal" 1363 | version = "0.24.0" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "de11355d1f6781482d027a3b4d4de7825dcedb197bf573e0596d00008402d060" 1366 | dependencies = [ 1367 | "bitflags", 1368 | "block", 1369 | "core-graphics-types", 1370 | "foreign-types 0.3.2", 1371 | "log", 1372 | "objc", 1373 | ] 1374 | 1375 | [[package]] 1376 | name = "minimal-lexical" 1377 | version = "0.2.1" 1378 | source = "registry+https://github.com/rust-lang/crates.io-index" 1379 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1380 | 1381 | [[package]] 1382 | name = "minimp3" 1383 | version = "0.5.1" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" 1386 | dependencies = [ 1387 | "minimp3-sys", 1388 | "slice-deque", 1389 | "thiserror", 1390 | ] 1391 | 1392 | [[package]] 1393 | name = "minimp3-sys" 1394 | version = "0.3.2" 1395 | source = "registry+https://github.com/rust-lang/crates.io-index" 1396 | checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90" 1397 | dependencies = [ 1398 | "cc", 1399 | ] 1400 | 1401 | [[package]] 1402 | name = "miniz_oxide" 1403 | version = "0.5.4" 1404 | source = "registry+https://github.com/rust-lang/crates.io-index" 1405 | checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" 1406 | dependencies = [ 1407 | "adler", 1408 | ] 1409 | 1410 | [[package]] 1411 | name = "miniz_oxide" 1412 | version = "0.6.2" 1413 | source = "registry+https://github.com/rust-lang/crates.io-index" 1414 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1415 | dependencies = [ 1416 | "adler", 1417 | ] 1418 | 1419 | [[package]] 1420 | name = "mint" 1421 | version = "0.5.9" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff" 1424 | 1425 | [[package]] 1426 | name = "mio" 1427 | version = "0.8.5" 1428 | source = "registry+https://github.com/rust-lang/crates.io-index" 1429 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" 1430 | dependencies = [ 1431 | "libc", 1432 | "log", 1433 | "wasi", 1434 | "windows-sys 0.42.0", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "naga" 1439 | version = "0.10.0" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" 1442 | dependencies = [ 1443 | "bit-set", 1444 | "bitflags", 1445 | "codespan-reporting", 1446 | "hexf-parse", 1447 | "indexmap", 1448 | "log", 1449 | "num-traits", 1450 | "rustc-hash", 1451 | "spirv", 1452 | "termcolor", 1453 | "thiserror", 1454 | "unicode-xid", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "ndk" 1459 | version = "0.6.0" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" 1462 | dependencies = [ 1463 | "bitflags", 1464 | "jni-sys", 1465 | "ndk-sys 0.3.0", 1466 | "num_enum", 1467 | "thiserror", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "ndk" 1472 | version = "0.7.0" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" 1475 | dependencies = [ 1476 | "bitflags", 1477 | "jni-sys", 1478 | "ndk-sys 0.4.0", 1479 | "num_enum", 1480 | "raw-window-handle 0.5.0", 1481 | "thiserror", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "ndk-context" 1486 | version = "0.1.1" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" 1489 | 1490 | [[package]] 1491 | name = "ndk-glue" 1492 | version = "0.7.0" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "0434fabdd2c15e0aab768ca31d5b7b333717f03cf02037d5a0a3ff3c278ed67f" 1495 | dependencies = [ 1496 | "libc", 1497 | "log", 1498 | "ndk 0.7.0", 1499 | "ndk-context", 1500 | "ndk-macro", 1501 | "ndk-sys 0.4.0", 1502 | "once_cell", 1503 | "parking_lot 0.12.1", 1504 | ] 1505 | 1506 | [[package]] 1507 | name = "ndk-macro" 1508 | version = "0.3.0" 1509 | source = "registry+https://github.com/rust-lang/crates.io-index" 1510 | checksum = "0df7ac00c4672f9d5aece54ee3347520b7e20f158656c7db2e6de01902eb7a6c" 1511 | dependencies = [ 1512 | "darling", 1513 | "proc-macro-crate", 1514 | "proc-macro2", 1515 | "quote", 1516 | "syn", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "ndk-sys" 1521 | version = "0.3.0" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" 1524 | dependencies = [ 1525 | "jni-sys", 1526 | ] 1527 | 1528 | [[package]] 1529 | name = "ndk-sys" 1530 | version = "0.4.0" 1531 | source = "registry+https://github.com/rust-lang/crates.io-index" 1532 | checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" 1533 | dependencies = [ 1534 | "jni-sys", 1535 | ] 1536 | 1537 | [[package]] 1538 | name = "nix" 1539 | version = "0.23.1" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" 1542 | dependencies = [ 1543 | "bitflags", 1544 | "cc", 1545 | "cfg-if", 1546 | "libc", 1547 | "memoffset 0.6.5", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "nix" 1552 | version = "0.24.2" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" 1555 | dependencies = [ 1556 | "bitflags", 1557 | "cfg-if", 1558 | "libc", 1559 | "memoffset 0.6.5", 1560 | ] 1561 | 1562 | [[package]] 1563 | name = "nix" 1564 | version = "0.25.0" 1565 | source = "registry+https://github.com/rust-lang/crates.io-index" 1566 | checksum = "e322c04a9e3440c327fca7b6c8a63e6890a32fa2ad689db972425f07e0d22abb" 1567 | dependencies = [ 1568 | "autocfg", 1569 | "bitflags", 1570 | "cfg-if", 1571 | "libc", 1572 | "memoffset 0.6.5", 1573 | "pin-utils", 1574 | ] 1575 | 1576 | [[package]] 1577 | name = "nom" 1578 | version = "7.1.1" 1579 | source = "registry+https://github.com/rust-lang/crates.io-index" 1580 | checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" 1581 | dependencies = [ 1582 | "memchr", 1583 | "minimal-lexical", 1584 | ] 1585 | 1586 | [[package]] 1587 | name = "num-derive" 1588 | version = "0.3.3" 1589 | source = "registry+https://github.com/rust-lang/crates.io-index" 1590 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 1591 | dependencies = [ 1592 | "proc-macro2", 1593 | "quote", 1594 | "syn", 1595 | ] 1596 | 1597 | [[package]] 1598 | name = "num-integer" 1599 | version = "0.1.45" 1600 | source = "registry+https://github.com/rust-lang/crates.io-index" 1601 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1602 | dependencies = [ 1603 | "autocfg", 1604 | "num-traits", 1605 | ] 1606 | 1607 | [[package]] 1608 | name = "num-rational" 1609 | version = "0.4.1" 1610 | source = "registry+https://github.com/rust-lang/crates.io-index" 1611 | checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" 1612 | dependencies = [ 1613 | "autocfg", 1614 | "num-integer", 1615 | "num-traits", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "num-traits" 1620 | version = "0.2.15" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" 1623 | dependencies = [ 1624 | "autocfg", 1625 | ] 1626 | 1627 | [[package]] 1628 | name = "num_cpus" 1629 | version = "1.13.1" 1630 | source = "registry+https://github.com/rust-lang/crates.io-index" 1631 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 1632 | dependencies = [ 1633 | "hermit-abi", 1634 | "libc", 1635 | ] 1636 | 1637 | [[package]] 1638 | name = "num_enum" 1639 | version = "0.5.7" 1640 | source = "registry+https://github.com/rust-lang/crates.io-index" 1641 | checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" 1642 | dependencies = [ 1643 | "num_enum_derive", 1644 | ] 1645 | 1646 | [[package]] 1647 | name = "num_enum_derive" 1648 | version = "0.5.7" 1649 | source = "registry+https://github.com/rust-lang/crates.io-index" 1650 | checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" 1651 | dependencies = [ 1652 | "proc-macro-crate", 1653 | "proc-macro2", 1654 | "quote", 1655 | "syn", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "objc" 1660 | version = "0.2.7" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" 1663 | dependencies = [ 1664 | "malloc_buf", 1665 | "objc_exception", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "objc_exception" 1670 | version = "0.1.2" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" 1673 | dependencies = [ 1674 | "cc", 1675 | ] 1676 | 1677 | [[package]] 1678 | name = "oboe" 1679 | version = "0.4.6" 1680 | source = "registry+https://github.com/rust-lang/crates.io-index" 1681 | checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" 1682 | dependencies = [ 1683 | "jni", 1684 | "ndk 0.6.0", 1685 | "ndk-context", 1686 | "num-derive", 1687 | "num-traits", 1688 | "oboe-sys", 1689 | ] 1690 | 1691 | [[package]] 1692 | name = "oboe-sys" 1693 | version = "0.4.5" 1694 | source = "registry+https://github.com/rust-lang/crates.io-index" 1695 | checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" 1696 | dependencies = [ 1697 | "cc", 1698 | ] 1699 | 1700 | [[package]] 1701 | name = "ogg" 1702 | version = "0.8.0" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "6951b4e8bf21c8193da321bcce9c9dd2e13c858fe078bf9054a288b419ae5d6e" 1705 | dependencies = [ 1706 | "byteorder", 1707 | ] 1708 | 1709 | [[package]] 1710 | name = "once_cell" 1711 | version = "1.13.1" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" 1714 | 1715 | [[package]] 1716 | name = "ordered-float" 1717 | version = "3.3.0" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "1f74e330193f90ec45e2b257fa3ef6df087784157ac1ad2c1e71c62837b03aa7" 1720 | dependencies = [ 1721 | "num-traits", 1722 | ] 1723 | 1724 | [[package]] 1725 | name = "owned_ttf_parser" 1726 | version = "0.15.1" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "07ef1a404ae479dd6906f4fa2c88b3c94028f1284beb42a47c183a7c27ee9a3e" 1729 | dependencies = [ 1730 | "ttf-parser", 1731 | ] 1732 | 1733 | [[package]] 1734 | name = "parking_lot" 1735 | version = "0.11.2" 1736 | source = "registry+https://github.com/rust-lang/crates.io-index" 1737 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1738 | dependencies = [ 1739 | "instant", 1740 | "lock_api", 1741 | "parking_lot_core 0.8.5", 1742 | ] 1743 | 1744 | [[package]] 1745 | name = "parking_lot" 1746 | version = "0.12.1" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1749 | dependencies = [ 1750 | "lock_api", 1751 | "parking_lot_core 0.9.4", 1752 | ] 1753 | 1754 | [[package]] 1755 | name = "parking_lot_core" 1756 | version = "0.8.5" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1759 | dependencies = [ 1760 | "cfg-if", 1761 | "instant", 1762 | "libc", 1763 | "redox_syscall", 1764 | "smallvec", 1765 | "winapi", 1766 | ] 1767 | 1768 | [[package]] 1769 | name = "parking_lot_core" 1770 | version = "0.9.4" 1771 | source = "registry+https://github.com/rust-lang/crates.io-index" 1772 | checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" 1773 | dependencies = [ 1774 | "cfg-if", 1775 | "libc", 1776 | "redox_syscall", 1777 | "smallvec", 1778 | "windows-sys 0.42.0", 1779 | ] 1780 | 1781 | [[package]] 1782 | name = "peeking_take_while" 1783 | version = "0.1.2" 1784 | source = "registry+https://github.com/rust-lang/crates.io-index" 1785 | checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" 1786 | 1787 | [[package]] 1788 | name = "percent-encoding" 1789 | version = "2.1.0" 1790 | source = "registry+https://github.com/rust-lang/crates.io-index" 1791 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1792 | 1793 | [[package]] 1794 | name = "pin-utils" 1795 | version = "0.1.0" 1796 | source = "registry+https://github.com/rust-lang/crates.io-index" 1797 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1798 | 1799 | [[package]] 1800 | name = "pkg-config" 1801 | version = "0.3.25" 1802 | source = "registry+https://github.com/rust-lang/crates.io-index" 1803 | checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" 1804 | 1805 | [[package]] 1806 | name = "png" 1807 | version = "0.17.7" 1808 | source = "registry+https://github.com/rust-lang/crates.io-index" 1809 | checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" 1810 | dependencies = [ 1811 | "bitflags", 1812 | "crc32fast", 1813 | "flate2", 1814 | "miniz_oxide 0.6.2", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "pollster" 1819 | version = "0.2.5" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "5da3b0203fd7ee5720aa0b5e790b591aa5d3f41c3ed2c34a3a393382198af2f7" 1822 | 1823 | [[package]] 1824 | name = "ppv-lite86" 1825 | version = "0.2.16" 1826 | source = "registry+https://github.com/rust-lang/crates.io-index" 1827 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1828 | 1829 | [[package]] 1830 | name = "proc-macro-crate" 1831 | version = "1.2.1" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" 1834 | dependencies = [ 1835 | "once_cell", 1836 | "thiserror", 1837 | "toml", 1838 | ] 1839 | 1840 | [[package]] 1841 | name = "proc-macro2" 1842 | version = "1.0.43" 1843 | source = "registry+https://github.com/rust-lang/crates.io-index" 1844 | checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" 1845 | dependencies = [ 1846 | "unicode-ident", 1847 | ] 1848 | 1849 | [[package]] 1850 | name = "profiling" 1851 | version = "1.0.7" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "74605f360ce573babfe43964cbe520294dcb081afbf8c108fc6e23036b4da2df" 1854 | 1855 | [[package]] 1856 | name = "pulldown-cmark" 1857 | version = "0.9.2" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "2d9cc634bc78768157b5cbfe988ffcd1dcba95cd2b2f03a88316c08c6d00ed63" 1860 | dependencies = [ 1861 | "bitflags", 1862 | "memchr", 1863 | "unicase", 1864 | ] 1865 | 1866 | [[package]] 1867 | name = "quote" 1868 | version = "1.0.21" 1869 | source = "registry+https://github.com/rust-lang/crates.io-index" 1870 | checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" 1871 | dependencies = [ 1872 | "proc-macro2", 1873 | ] 1874 | 1875 | [[package]] 1876 | name = "rand" 1877 | version = "0.8.5" 1878 | source = "registry+https://github.com/rust-lang/crates.io-index" 1879 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1880 | dependencies = [ 1881 | "libc", 1882 | "rand_chacha", 1883 | "rand_core", 1884 | ] 1885 | 1886 | [[package]] 1887 | name = "rand_chacha" 1888 | version = "0.3.1" 1889 | source = "registry+https://github.com/rust-lang/crates.io-index" 1890 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1891 | dependencies = [ 1892 | "ppv-lite86", 1893 | "rand_core", 1894 | ] 1895 | 1896 | [[package]] 1897 | name = "rand_core" 1898 | version = "0.6.3" 1899 | source = "registry+https://github.com/rust-lang/crates.io-index" 1900 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1901 | dependencies = [ 1902 | "getrandom", 1903 | ] 1904 | 1905 | [[package]] 1906 | name = "range-alloc" 1907 | version = "0.1.2" 1908 | source = "registry+https://github.com/rust-lang/crates.io-index" 1909 | checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" 1910 | 1911 | [[package]] 1912 | name = "raw-window-handle" 1913 | version = "0.4.3" 1914 | source = "registry+https://github.com/rust-lang/crates.io-index" 1915 | checksum = "b800beb9b6e7d2df1fe337c9e3d04e3af22a124460fb4c30fcc22c9117cefb41" 1916 | dependencies = [ 1917 | "cty", 1918 | ] 1919 | 1920 | [[package]] 1921 | name = "raw-window-handle" 1922 | version = "0.5.0" 1923 | source = "registry+https://github.com/rust-lang/crates.io-index" 1924 | checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" 1925 | dependencies = [ 1926 | "cty", 1927 | ] 1928 | 1929 | [[package]] 1930 | name = "rayon" 1931 | version = "1.5.3" 1932 | source = "registry+https://github.com/rust-lang/crates.io-index" 1933 | checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" 1934 | dependencies = [ 1935 | "autocfg", 1936 | "crossbeam-deque", 1937 | "either", 1938 | "rayon-core", 1939 | ] 1940 | 1941 | [[package]] 1942 | name = "rayon-core" 1943 | version = "1.9.3" 1944 | source = "registry+https://github.com/rust-lang/crates.io-index" 1945 | checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" 1946 | dependencies = [ 1947 | "crossbeam-channel", 1948 | "crossbeam-deque", 1949 | "crossbeam-utils", 1950 | "num_cpus", 1951 | ] 1952 | 1953 | [[package]] 1954 | name = "redox_syscall" 1955 | version = "0.2.16" 1956 | source = "registry+https://github.com/rust-lang/crates.io-index" 1957 | checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" 1958 | dependencies = [ 1959 | "bitflags", 1960 | ] 1961 | 1962 | [[package]] 1963 | name = "redox_users" 1964 | version = "0.4.3" 1965 | source = "registry+https://github.com/rust-lang/crates.io-index" 1966 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1967 | dependencies = [ 1968 | "getrandom", 1969 | "redox_syscall", 1970 | "thiserror", 1971 | ] 1972 | 1973 | [[package]] 1974 | name = "regex" 1975 | version = "1.6.0" 1976 | source = "registry+https://github.com/rust-lang/crates.io-index" 1977 | checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" 1978 | dependencies = [ 1979 | "regex-syntax", 1980 | ] 1981 | 1982 | [[package]] 1983 | name = "regex-syntax" 1984 | version = "0.6.27" 1985 | source = "registry+https://github.com/rust-lang/crates.io-index" 1986 | checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" 1987 | 1988 | [[package]] 1989 | name = "remove_dir_all" 1990 | version = "0.5.3" 1991 | source = "registry+https://github.com/rust-lang/crates.io-index" 1992 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1993 | dependencies = [ 1994 | "winapi", 1995 | ] 1996 | 1997 | [[package]] 1998 | name = "renderdoc-sys" 1999 | version = "0.7.1" 2000 | source = "registry+https://github.com/rust-lang/crates.io-index" 2001 | checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" 2002 | 2003 | [[package]] 2004 | name = "rodio" 2005 | version = "0.16.0" 2006 | source = "registry+https://github.com/rust-lang/crates.io-index" 2007 | checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" 2008 | dependencies = [ 2009 | "claxon", 2010 | "cpal", 2011 | "hound", 2012 | "lewton", 2013 | "minimp3", 2014 | ] 2015 | 2016 | [[package]] 2017 | name = "rustc-hash" 2018 | version = "1.1.0" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 2021 | 2022 | [[package]] 2023 | name = "rustc_version" 2024 | version = "0.2.3" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 2027 | dependencies = [ 2028 | "semver 0.9.0", 2029 | ] 2030 | 2031 | [[package]] 2032 | name = "rusty-xinput" 2033 | version = "1.2.0" 2034 | source = "registry+https://github.com/rust-lang/crates.io-index" 2035 | checksum = "d2aa654bc32eb9ca14cce1a084abc9dfe43949a4547c35269a094c39272db3bb" 2036 | dependencies = [ 2037 | "lazy_static", 2038 | "log", 2039 | "winapi", 2040 | ] 2041 | 2042 | [[package]] 2043 | name = "ryu" 2044 | version = "1.0.11" 2045 | source = "registry+https://github.com/rust-lang/crates.io-index" 2046 | checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" 2047 | 2048 | [[package]] 2049 | name = "safe_arch" 2050 | version = "0.5.2" 2051 | source = "registry+https://github.com/rust-lang/crates.io-index" 2052 | checksum = "c1ff3d6d9696af502cc3110dacce942840fb06ff4514cad92236ecc455f2ce05" 2053 | dependencies = [ 2054 | "bytemuck", 2055 | ] 2056 | 2057 | [[package]] 2058 | name = "same-file" 2059 | version = "1.0.6" 2060 | source = "registry+https://github.com/rust-lang/crates.io-index" 2061 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2062 | dependencies = [ 2063 | "winapi-util", 2064 | ] 2065 | 2066 | [[package]] 2067 | name = "scoped-tls" 2068 | version = "1.0.0" 2069 | source = "registry+https://github.com/rust-lang/crates.io-index" 2070 | checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" 2071 | 2072 | [[package]] 2073 | name = "scopeguard" 2074 | version = "1.1.0" 2075 | source = "registry+https://github.com/rust-lang/crates.io-index" 2076 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 2077 | 2078 | [[package]] 2079 | name = "sctk-adwaita" 2080 | version = "0.4.3" 2081 | source = "registry+https://github.com/rust-lang/crates.io-index" 2082 | checksum = "61270629cc6b4d77ec1907db1033d5c2e1a404c412743621981a871dc9c12339" 2083 | dependencies = [ 2084 | "crossfont", 2085 | "log", 2086 | "smithay-client-toolkit", 2087 | "tiny-skia", 2088 | ] 2089 | 2090 | [[package]] 2091 | name = "semver" 2092 | version = "0.9.0" 2093 | source = "registry+https://github.com/rust-lang/crates.io-index" 2094 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2095 | dependencies = [ 2096 | "semver-parser", 2097 | ] 2098 | 2099 | [[package]] 2100 | name = "semver" 2101 | version = "1.0.13" 2102 | source = "registry+https://github.com/rust-lang/crates.io-index" 2103 | checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" 2104 | dependencies = [ 2105 | "serde", 2106 | ] 2107 | 2108 | [[package]] 2109 | name = "semver-parser" 2110 | version = "0.7.0" 2111 | source = "registry+https://github.com/rust-lang/crates.io-index" 2112 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2113 | 2114 | [[package]] 2115 | name = "serde" 2116 | version = "1.0.144" 2117 | source = "registry+https://github.com/rust-lang/crates.io-index" 2118 | checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" 2119 | dependencies = [ 2120 | "serde_derive", 2121 | ] 2122 | 2123 | [[package]] 2124 | name = "serde_derive" 2125 | version = "1.0.144" 2126 | source = "registry+https://github.com/rust-lang/crates.io-index" 2127 | checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" 2128 | dependencies = [ 2129 | "proc-macro2", 2130 | "quote", 2131 | "syn", 2132 | ] 2133 | 2134 | [[package]] 2135 | name = "serde_json" 2136 | version = "1.0.85" 2137 | source = "registry+https://github.com/rust-lang/crates.io-index" 2138 | checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" 2139 | dependencies = [ 2140 | "itoa", 2141 | "ryu", 2142 | "serde", 2143 | ] 2144 | 2145 | [[package]] 2146 | name = "servo-fontconfig" 2147 | version = "0.5.1" 2148 | source = "registry+https://github.com/rust-lang/crates.io-index" 2149 | checksum = "c7e3e22fe5fd73d04ebf0daa049d3efe3eae55369ce38ab16d07ddd9ac5c217c" 2150 | dependencies = [ 2151 | "libc", 2152 | "servo-fontconfig-sys", 2153 | ] 2154 | 2155 | [[package]] 2156 | name = "servo-fontconfig-sys" 2157 | version = "5.1.0" 2158 | source = "registry+https://github.com/rust-lang/crates.io-index" 2159 | checksum = "e36b879db9892dfa40f95da1c38a835d41634b825fbd8c4c418093d53c24b388" 2160 | dependencies = [ 2161 | "expat-sys", 2162 | "freetype-sys", 2163 | "pkg-config", 2164 | ] 2165 | 2166 | [[package]] 2167 | name = "sha1" 2168 | version = "0.6.1" 2169 | source = "registry+https://github.com/rust-lang/crates.io-index" 2170 | checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 2171 | dependencies = [ 2172 | "sha1_smol", 2173 | ] 2174 | 2175 | [[package]] 2176 | name = "sha1_smol" 2177 | version = "1.0.0" 2178 | source = "registry+https://github.com/rust-lang/crates.io-index" 2179 | checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" 2180 | 2181 | [[package]] 2182 | name = "shlex" 2183 | version = "1.1.0" 2184 | source = "registry+https://github.com/rust-lang/crates.io-index" 2185 | checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" 2186 | 2187 | [[package]] 2188 | name = "skeptic" 2189 | version = "0.13.7" 2190 | source = "registry+https://github.com/rust-lang/crates.io-index" 2191 | checksum = "16d23b015676c90a0f01c197bfdc786c20342c73a0afdda9025adb0bc42940a8" 2192 | dependencies = [ 2193 | "bytecount", 2194 | "cargo_metadata", 2195 | "error-chain", 2196 | "glob", 2197 | "pulldown-cmark", 2198 | "tempfile", 2199 | "walkdir", 2200 | ] 2201 | 2202 | [[package]] 2203 | name = "slice-deque" 2204 | version = "0.3.0" 2205 | source = "registry+https://github.com/rust-lang/crates.io-index" 2206 | checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25" 2207 | dependencies = [ 2208 | "libc", 2209 | "mach", 2210 | "winapi", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "slotmap" 2215 | version = "1.0.6" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "e1e08e261d0e8f5c43123b7adf3e4ca1690d655377ac93a03b2c9d3e98de1342" 2218 | dependencies = [ 2219 | "version_check", 2220 | ] 2221 | 2222 | [[package]] 2223 | name = "smallvec" 2224 | version = "1.9.0" 2225 | source = "registry+https://github.com/rust-lang/crates.io-index" 2226 | checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" 2227 | 2228 | [[package]] 2229 | name = "smart-default" 2230 | version = "0.6.0" 2231 | source = "registry+https://github.com/rust-lang/crates.io-index" 2232 | checksum = "133659a15339456eeeb07572eb02a91c91e9815e9cbc89566944d2c8d3efdbf6" 2233 | dependencies = [ 2234 | "proc-macro2", 2235 | "quote", 2236 | "syn", 2237 | ] 2238 | 2239 | [[package]] 2240 | name = "smithay-client-toolkit" 2241 | version = "0.16.0" 2242 | source = "registry+https://github.com/rust-lang/crates.io-index" 2243 | checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" 2244 | dependencies = [ 2245 | "bitflags", 2246 | "calloop", 2247 | "dlib", 2248 | "lazy_static", 2249 | "log", 2250 | "memmap2", 2251 | "nix 0.24.2", 2252 | "pkg-config", 2253 | "wayland-client", 2254 | "wayland-cursor", 2255 | "wayland-protocols", 2256 | ] 2257 | 2258 | [[package]] 2259 | name = "spirv" 2260 | version = "0.2.0+1.5.4" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" 2263 | dependencies = [ 2264 | "bitflags", 2265 | "num-traits", 2266 | ] 2267 | 2268 | [[package]] 2269 | name = "static_assertions" 2270 | version = "1.1.0" 2271 | source = "registry+https://github.com/rust-lang/crates.io-index" 2272 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2273 | 2274 | [[package]] 2275 | name = "stdweb" 2276 | version = "0.4.20" 2277 | source = "registry+https://github.com/rust-lang/crates.io-index" 2278 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 2279 | dependencies = [ 2280 | "discard", 2281 | "rustc_version", 2282 | "stdweb-derive", 2283 | "stdweb-internal-macros", 2284 | "stdweb-internal-runtime", 2285 | "wasm-bindgen", 2286 | ] 2287 | 2288 | [[package]] 2289 | name = "stdweb-derive" 2290 | version = "0.5.3" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 2293 | dependencies = [ 2294 | "proc-macro2", 2295 | "quote", 2296 | "serde", 2297 | "serde_derive", 2298 | "syn", 2299 | ] 2300 | 2301 | [[package]] 2302 | name = "stdweb-internal-macros" 2303 | version = "0.2.9" 2304 | source = "registry+https://github.com/rust-lang/crates.io-index" 2305 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 2306 | dependencies = [ 2307 | "base-x", 2308 | "proc-macro2", 2309 | "quote", 2310 | "serde", 2311 | "serde_derive", 2312 | "serde_json", 2313 | "sha1", 2314 | "syn", 2315 | ] 2316 | 2317 | [[package]] 2318 | name = "stdweb-internal-runtime" 2319 | version = "0.1.5" 2320 | source = "registry+https://github.com/rust-lang/crates.io-index" 2321 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 2322 | 2323 | [[package]] 2324 | name = "strsim" 2325 | version = "0.10.0" 2326 | source = "registry+https://github.com/rust-lang/crates.io-index" 2327 | checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" 2328 | 2329 | [[package]] 2330 | name = "syn" 2331 | version = "1.0.99" 2332 | source = "registry+https://github.com/rust-lang/crates.io-index" 2333 | checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" 2334 | dependencies = [ 2335 | "proc-macro2", 2336 | "quote", 2337 | "unicode-ident", 2338 | ] 2339 | 2340 | [[package]] 2341 | name = "tempfile" 2342 | version = "3.3.0" 2343 | source = "registry+https://github.com/rust-lang/crates.io-index" 2344 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 2345 | dependencies = [ 2346 | "cfg-if", 2347 | "fastrand", 2348 | "libc", 2349 | "redox_syscall", 2350 | "remove_dir_all", 2351 | "winapi", 2352 | ] 2353 | 2354 | [[package]] 2355 | name = "termcolor" 2356 | version = "1.1.3" 2357 | source = "registry+https://github.com/rust-lang/crates.io-index" 2358 | checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" 2359 | dependencies = [ 2360 | "winapi-util", 2361 | ] 2362 | 2363 | [[package]] 2364 | name = "thiserror" 2365 | version = "1.0.32" 2366 | source = "registry+https://github.com/rust-lang/crates.io-index" 2367 | checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" 2368 | dependencies = [ 2369 | "thiserror-impl", 2370 | ] 2371 | 2372 | [[package]] 2373 | name = "thiserror-impl" 2374 | version = "1.0.32" 2375 | source = "registry+https://github.com/rust-lang/crates.io-index" 2376 | checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" 2377 | dependencies = [ 2378 | "proc-macro2", 2379 | "quote", 2380 | "syn", 2381 | ] 2382 | 2383 | [[package]] 2384 | name = "tiff" 2385 | version = "0.7.4" 2386 | source = "registry+https://github.com/rust-lang/crates.io-index" 2387 | checksum = "9f71e422515e83e3ab8a03d4781d05ebf864fc61f4546e6ecffa58cbd34181a0" 2388 | dependencies = [ 2389 | "flate2", 2390 | "jpeg-decoder", 2391 | "weezl", 2392 | ] 2393 | 2394 | [[package]] 2395 | name = "tiny-skia" 2396 | version = "0.7.0" 2397 | source = "registry+https://github.com/rust-lang/crates.io-index" 2398 | checksum = "642680569bb895b16e4b9d181c60be1ed136fa0c9c7f11d004daf053ba89bf82" 2399 | dependencies = [ 2400 | "arrayref", 2401 | "arrayvec 0.5.2", 2402 | "bytemuck", 2403 | "cfg-if", 2404 | "png", 2405 | "safe_arch", 2406 | "tiny-skia-path", 2407 | ] 2408 | 2409 | [[package]] 2410 | name = "tiny-skia-path" 2411 | version = "0.7.0" 2412 | source = "registry+https://github.com/rust-lang/crates.io-index" 2413 | checksum = "c114d32f0c2ee43d585367cb013dfaba967ab9f62b90d9af0d696e955e70fa6c" 2414 | dependencies = [ 2415 | "arrayref", 2416 | "bytemuck", 2417 | ] 2418 | 2419 | [[package]] 2420 | name = "tinyvec" 2421 | version = "1.6.0" 2422 | source = "registry+https://github.com/rust-lang/crates.io-index" 2423 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2424 | dependencies = [ 2425 | "tinyvec_macros", 2426 | ] 2427 | 2428 | [[package]] 2429 | name = "tinyvec_macros" 2430 | version = "0.1.0" 2431 | source = "registry+https://github.com/rust-lang/crates.io-index" 2432 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2433 | 2434 | [[package]] 2435 | name = "toml" 2436 | version = "0.5.9" 2437 | source = "registry+https://github.com/rust-lang/crates.io-index" 2438 | checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" 2439 | dependencies = [ 2440 | "serde", 2441 | ] 2442 | 2443 | [[package]] 2444 | name = "ttf-parser" 2445 | version = "0.15.2" 2446 | source = "registry+https://github.com/rust-lang/crates.io-index" 2447 | checksum = "7b3e06c9b9d80ed6b745c7159c40b311ad2916abb34a49e9be2653b90db0d8dd" 2448 | 2449 | [[package]] 2450 | name = "twox-hash" 2451 | version = "1.6.3" 2452 | source = "registry+https://github.com/rust-lang/crates.io-index" 2453 | checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" 2454 | dependencies = [ 2455 | "cfg-if", 2456 | "rand", 2457 | "static_assertions", 2458 | ] 2459 | 2460 | [[package]] 2461 | name = "typed-arena" 2462 | version = "2.0.1" 2463 | source = "registry+https://github.com/rust-lang/crates.io-index" 2464 | checksum = "0685c84d5d54d1c26f7d3eb96cd41550adb97baed141a761cf335d3d33bcd0ae" 2465 | 2466 | [[package]] 2467 | name = "unicase" 2468 | version = "2.6.0" 2469 | source = "registry+https://github.com/rust-lang/crates.io-index" 2470 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 2471 | dependencies = [ 2472 | "version_check", 2473 | ] 2474 | 2475 | [[package]] 2476 | name = "unicode-ident" 2477 | version = "1.0.3" 2478 | source = "registry+https://github.com/rust-lang/crates.io-index" 2479 | checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" 2480 | 2481 | [[package]] 2482 | name = "unicode-width" 2483 | version = "0.1.10" 2484 | source = "registry+https://github.com/rust-lang/crates.io-index" 2485 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 2486 | 2487 | [[package]] 2488 | name = "unicode-xid" 2489 | version = "0.2.4" 2490 | source = "registry+https://github.com/rust-lang/crates.io-index" 2491 | checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" 2492 | 2493 | [[package]] 2494 | name = "uuid" 2495 | version = "1.2.1" 2496 | source = "registry+https://github.com/rust-lang/crates.io-index" 2497 | checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" 2498 | 2499 | [[package]] 2500 | name = "vec_map" 2501 | version = "0.8.2" 2502 | source = "registry+https://github.com/rust-lang/crates.io-index" 2503 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 2504 | 2505 | [[package]] 2506 | name = "version_check" 2507 | version = "0.9.4" 2508 | source = "registry+https://github.com/rust-lang/crates.io-index" 2509 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2510 | 2511 | [[package]] 2512 | name = "walkdir" 2513 | version = "2.3.2" 2514 | source = "registry+https://github.com/rust-lang/crates.io-index" 2515 | checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" 2516 | dependencies = [ 2517 | "same-file", 2518 | "winapi", 2519 | "winapi-util", 2520 | ] 2521 | 2522 | [[package]] 2523 | name = "wasi" 2524 | version = "0.11.0+wasi-snapshot-preview1" 2525 | source = "registry+https://github.com/rust-lang/crates.io-index" 2526 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2527 | 2528 | [[package]] 2529 | name = "wasm-bindgen" 2530 | version = "0.2.83" 2531 | source = "registry+https://github.com/rust-lang/crates.io-index" 2532 | checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" 2533 | dependencies = [ 2534 | "cfg-if", 2535 | "wasm-bindgen-macro", 2536 | ] 2537 | 2538 | [[package]] 2539 | name = "wasm-bindgen-backend" 2540 | version = "0.2.83" 2541 | source = "registry+https://github.com/rust-lang/crates.io-index" 2542 | checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" 2543 | dependencies = [ 2544 | "bumpalo", 2545 | "log", 2546 | "once_cell", 2547 | "proc-macro2", 2548 | "quote", 2549 | "syn", 2550 | "wasm-bindgen-shared", 2551 | ] 2552 | 2553 | [[package]] 2554 | name = "wasm-bindgen-futures" 2555 | version = "0.4.33" 2556 | source = "registry+https://github.com/rust-lang/crates.io-index" 2557 | checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" 2558 | dependencies = [ 2559 | "cfg-if", 2560 | "js-sys", 2561 | "wasm-bindgen", 2562 | "web-sys", 2563 | ] 2564 | 2565 | [[package]] 2566 | name = "wasm-bindgen-macro" 2567 | version = "0.2.83" 2568 | source = "registry+https://github.com/rust-lang/crates.io-index" 2569 | checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" 2570 | dependencies = [ 2571 | "quote", 2572 | "wasm-bindgen-macro-support", 2573 | ] 2574 | 2575 | [[package]] 2576 | name = "wasm-bindgen-macro-support" 2577 | version = "0.2.83" 2578 | source = "registry+https://github.com/rust-lang/crates.io-index" 2579 | checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" 2580 | dependencies = [ 2581 | "proc-macro2", 2582 | "quote", 2583 | "syn", 2584 | "wasm-bindgen-backend", 2585 | "wasm-bindgen-shared", 2586 | ] 2587 | 2588 | [[package]] 2589 | name = "wasm-bindgen-shared" 2590 | version = "0.2.83" 2591 | source = "registry+https://github.com/rust-lang/crates.io-index" 2592 | checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" 2593 | 2594 | [[package]] 2595 | name = "wayland-client" 2596 | version = "0.29.5" 2597 | source = "registry+https://github.com/rust-lang/crates.io-index" 2598 | checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" 2599 | dependencies = [ 2600 | "bitflags", 2601 | "downcast-rs", 2602 | "libc", 2603 | "nix 0.24.2", 2604 | "scoped-tls", 2605 | "wayland-commons", 2606 | "wayland-scanner", 2607 | "wayland-sys", 2608 | ] 2609 | 2610 | [[package]] 2611 | name = "wayland-commons" 2612 | version = "0.29.5" 2613 | source = "registry+https://github.com/rust-lang/crates.io-index" 2614 | checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" 2615 | dependencies = [ 2616 | "nix 0.24.2", 2617 | "once_cell", 2618 | "smallvec", 2619 | "wayland-sys", 2620 | ] 2621 | 2622 | [[package]] 2623 | name = "wayland-cursor" 2624 | version = "0.29.5" 2625 | source = "registry+https://github.com/rust-lang/crates.io-index" 2626 | checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" 2627 | dependencies = [ 2628 | "nix 0.24.2", 2629 | "wayland-client", 2630 | "xcursor", 2631 | ] 2632 | 2633 | [[package]] 2634 | name = "wayland-protocols" 2635 | version = "0.29.5" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" 2638 | dependencies = [ 2639 | "bitflags", 2640 | "wayland-client", 2641 | "wayland-commons", 2642 | "wayland-scanner", 2643 | ] 2644 | 2645 | [[package]] 2646 | name = "wayland-scanner" 2647 | version = "0.29.5" 2648 | source = "registry+https://github.com/rust-lang/crates.io-index" 2649 | checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" 2650 | dependencies = [ 2651 | "proc-macro2", 2652 | "quote", 2653 | "xml-rs", 2654 | ] 2655 | 2656 | [[package]] 2657 | name = "wayland-sys" 2658 | version = "0.29.5" 2659 | source = "registry+https://github.com/rust-lang/crates.io-index" 2660 | checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" 2661 | dependencies = [ 2662 | "dlib", 2663 | "lazy_static", 2664 | "pkg-config", 2665 | ] 2666 | 2667 | [[package]] 2668 | name = "web-sys" 2669 | version = "0.3.60" 2670 | source = "registry+https://github.com/rust-lang/crates.io-index" 2671 | checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" 2672 | dependencies = [ 2673 | "js-sys", 2674 | "wasm-bindgen", 2675 | ] 2676 | 2677 | [[package]] 2678 | name = "weezl" 2679 | version = "0.1.7" 2680 | source = "registry+https://github.com/rust-lang/crates.io-index" 2681 | checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" 2682 | 2683 | [[package]] 2684 | name = "wgpu" 2685 | version = "0.14.0" 2686 | source = "registry+https://github.com/rust-lang/crates.io-index" 2687 | checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" 2688 | dependencies = [ 2689 | "arrayvec 0.7.2", 2690 | "js-sys", 2691 | "log", 2692 | "naga", 2693 | "parking_lot 0.11.2", 2694 | "raw-window-handle 0.5.0", 2695 | "smallvec", 2696 | "static_assertions", 2697 | "wasm-bindgen", 2698 | "wasm-bindgen-futures", 2699 | "web-sys", 2700 | "wgpu-core", 2701 | "wgpu-hal", 2702 | "wgpu-types", 2703 | ] 2704 | 2705 | [[package]] 2706 | name = "wgpu-core" 2707 | version = "0.14.0" 2708 | source = "registry+https://github.com/rust-lang/crates.io-index" 2709 | checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" 2710 | dependencies = [ 2711 | "arrayvec 0.7.2", 2712 | "bit-vec", 2713 | "bitflags", 2714 | "cfg_aliases", 2715 | "codespan-reporting", 2716 | "fxhash", 2717 | "log", 2718 | "naga", 2719 | "parking_lot 0.11.2", 2720 | "profiling", 2721 | "raw-window-handle 0.5.0", 2722 | "smallvec", 2723 | "thiserror", 2724 | "web-sys", 2725 | "wgpu-hal", 2726 | "wgpu-types", 2727 | ] 2728 | 2729 | [[package]] 2730 | name = "wgpu-hal" 2731 | version = "0.14.0" 2732 | source = "registry+https://github.com/rust-lang/crates.io-index" 2733 | checksum = "cdae6a80dbc725343f02f854b310b37190be946aeea65e9d83afaa7d840ebaac" 2734 | dependencies = [ 2735 | "android_system_properties", 2736 | "arrayvec 0.7.2", 2737 | "ash", 2738 | "bit-set", 2739 | "bitflags", 2740 | "block", 2741 | "core-graphics-types", 2742 | "d3d12", 2743 | "foreign-types 0.3.2", 2744 | "fxhash", 2745 | "glow", 2746 | "gpu-alloc", 2747 | "gpu-descriptor", 2748 | "js-sys", 2749 | "khronos-egl", 2750 | "libloading", 2751 | "log", 2752 | "metal", 2753 | "naga", 2754 | "objc", 2755 | "parking_lot 0.11.2", 2756 | "profiling", 2757 | "range-alloc", 2758 | "raw-window-handle 0.5.0", 2759 | "renderdoc-sys", 2760 | "smallvec", 2761 | "thiserror", 2762 | "wasm-bindgen", 2763 | "web-sys", 2764 | "wgpu-types", 2765 | "winapi", 2766 | ] 2767 | 2768 | [[package]] 2769 | name = "wgpu-types" 2770 | version = "0.14.0" 2771 | source = "registry+https://github.com/rust-lang/crates.io-index" 2772 | checksum = "28fb86c1909233c804aa79b7dd1ad06ebd979b2a465e3e980582db0ea9e69f3f" 2773 | dependencies = [ 2774 | "bitflags", 2775 | ] 2776 | 2777 | [[package]] 2778 | name = "winapi" 2779 | version = "0.3.9" 2780 | source = "registry+https://github.com/rust-lang/crates.io-index" 2781 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2782 | dependencies = [ 2783 | "winapi-i686-pc-windows-gnu", 2784 | "winapi-x86_64-pc-windows-gnu", 2785 | ] 2786 | 2787 | [[package]] 2788 | name = "winapi-i686-pc-windows-gnu" 2789 | version = "0.4.0" 2790 | source = "registry+https://github.com/rust-lang/crates.io-index" 2791 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2792 | 2793 | [[package]] 2794 | name = "winapi-util" 2795 | version = "0.1.5" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2798 | dependencies = [ 2799 | "winapi", 2800 | ] 2801 | 2802 | [[package]] 2803 | name = "winapi-x86_64-pc-windows-gnu" 2804 | version = "0.4.0" 2805 | source = "registry+https://github.com/rust-lang/crates.io-index" 2806 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2807 | 2808 | [[package]] 2809 | name = "windows" 2810 | version = "0.37.0" 2811 | source = "registry+https://github.com/rust-lang/crates.io-index" 2812 | checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" 2813 | dependencies = [ 2814 | "windows_aarch64_msvc 0.37.0", 2815 | "windows_i686_gnu 0.37.0", 2816 | "windows_i686_msvc 0.37.0", 2817 | "windows_x86_64_gnu 0.37.0", 2818 | "windows_x86_64_msvc 0.37.0", 2819 | ] 2820 | 2821 | [[package]] 2822 | name = "windows-sys" 2823 | version = "0.36.1" 2824 | source = "registry+https://github.com/rust-lang/crates.io-index" 2825 | checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" 2826 | dependencies = [ 2827 | "windows_aarch64_msvc 0.36.1", 2828 | "windows_i686_gnu 0.36.1", 2829 | "windows_i686_msvc 0.36.1", 2830 | "windows_x86_64_gnu 0.36.1", 2831 | "windows_x86_64_msvc 0.36.1", 2832 | ] 2833 | 2834 | [[package]] 2835 | name = "windows-sys" 2836 | version = "0.42.0" 2837 | source = "registry+https://github.com/rust-lang/crates.io-index" 2838 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" 2839 | dependencies = [ 2840 | "windows_aarch64_gnullvm", 2841 | "windows_aarch64_msvc 0.42.0", 2842 | "windows_i686_gnu 0.42.0", 2843 | "windows_i686_msvc 0.42.0", 2844 | "windows_x86_64_gnu 0.42.0", 2845 | "windows_x86_64_gnullvm", 2846 | "windows_x86_64_msvc 0.42.0", 2847 | ] 2848 | 2849 | [[package]] 2850 | name = "windows_aarch64_gnullvm" 2851 | version = "0.42.0" 2852 | source = "registry+https://github.com/rust-lang/crates.io-index" 2853 | checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" 2854 | 2855 | [[package]] 2856 | name = "windows_aarch64_msvc" 2857 | version = "0.36.1" 2858 | source = "registry+https://github.com/rust-lang/crates.io-index" 2859 | checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" 2860 | 2861 | [[package]] 2862 | name = "windows_aarch64_msvc" 2863 | version = "0.37.0" 2864 | source = "registry+https://github.com/rust-lang/crates.io-index" 2865 | checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" 2866 | 2867 | [[package]] 2868 | name = "windows_aarch64_msvc" 2869 | version = "0.42.0" 2870 | source = "registry+https://github.com/rust-lang/crates.io-index" 2871 | checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" 2872 | 2873 | [[package]] 2874 | name = "windows_i686_gnu" 2875 | version = "0.36.1" 2876 | source = "registry+https://github.com/rust-lang/crates.io-index" 2877 | checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" 2878 | 2879 | [[package]] 2880 | name = "windows_i686_gnu" 2881 | version = "0.37.0" 2882 | source = "registry+https://github.com/rust-lang/crates.io-index" 2883 | checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" 2884 | 2885 | [[package]] 2886 | name = "windows_i686_gnu" 2887 | version = "0.42.0" 2888 | source = "registry+https://github.com/rust-lang/crates.io-index" 2889 | checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" 2890 | 2891 | [[package]] 2892 | name = "windows_i686_msvc" 2893 | version = "0.36.1" 2894 | source = "registry+https://github.com/rust-lang/crates.io-index" 2895 | checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" 2896 | 2897 | [[package]] 2898 | name = "windows_i686_msvc" 2899 | version = "0.37.0" 2900 | source = "registry+https://github.com/rust-lang/crates.io-index" 2901 | checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" 2902 | 2903 | [[package]] 2904 | name = "windows_i686_msvc" 2905 | version = "0.42.0" 2906 | source = "registry+https://github.com/rust-lang/crates.io-index" 2907 | checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" 2908 | 2909 | [[package]] 2910 | name = "windows_x86_64_gnu" 2911 | version = "0.36.1" 2912 | source = "registry+https://github.com/rust-lang/crates.io-index" 2913 | checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" 2914 | 2915 | [[package]] 2916 | name = "windows_x86_64_gnu" 2917 | version = "0.37.0" 2918 | source = "registry+https://github.com/rust-lang/crates.io-index" 2919 | checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" 2920 | 2921 | [[package]] 2922 | name = "windows_x86_64_gnu" 2923 | version = "0.42.0" 2924 | source = "registry+https://github.com/rust-lang/crates.io-index" 2925 | checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" 2926 | 2927 | [[package]] 2928 | name = "windows_x86_64_gnullvm" 2929 | version = "0.42.0" 2930 | source = "registry+https://github.com/rust-lang/crates.io-index" 2931 | checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" 2932 | 2933 | [[package]] 2934 | name = "windows_x86_64_msvc" 2935 | version = "0.36.1" 2936 | source = "registry+https://github.com/rust-lang/crates.io-index" 2937 | checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" 2938 | 2939 | [[package]] 2940 | name = "windows_x86_64_msvc" 2941 | version = "0.37.0" 2942 | source = "registry+https://github.com/rust-lang/crates.io-index" 2943 | checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" 2944 | 2945 | [[package]] 2946 | name = "windows_x86_64_msvc" 2947 | version = "0.42.0" 2948 | source = "registry+https://github.com/rust-lang/crates.io-index" 2949 | checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" 2950 | 2951 | [[package]] 2952 | name = "winit" 2953 | version = "0.27.5" 2954 | source = "registry+https://github.com/rust-lang/crates.io-index" 2955 | checksum = "bb796d6fbd86b2fd896c9471e6f04d39d750076ebe5680a3958f00f5ab97657c" 2956 | dependencies = [ 2957 | "bitflags", 2958 | "cocoa", 2959 | "core-foundation", 2960 | "core-graphics", 2961 | "dispatch", 2962 | "instant", 2963 | "libc", 2964 | "log", 2965 | "mio", 2966 | "ndk 0.7.0", 2967 | "ndk-glue", 2968 | "objc", 2969 | "once_cell", 2970 | "parking_lot 0.12.1", 2971 | "percent-encoding", 2972 | "raw-window-handle 0.4.3", 2973 | "raw-window-handle 0.5.0", 2974 | "sctk-adwaita", 2975 | "serde", 2976 | "smithay-client-toolkit", 2977 | "wasm-bindgen", 2978 | "wayland-client", 2979 | "wayland-protocols", 2980 | "web-sys", 2981 | "windows-sys 0.36.1", 2982 | "x11-dl", 2983 | ] 2984 | 2985 | [[package]] 2986 | name = "wio" 2987 | version = "0.2.2" 2988 | source = "registry+https://github.com/rust-lang/crates.io-index" 2989 | checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" 2990 | dependencies = [ 2991 | "winapi", 2992 | ] 2993 | 2994 | [[package]] 2995 | name = "x11-dl" 2996 | version = "2.20.0" 2997 | source = "registry+https://github.com/rust-lang/crates.io-index" 2998 | checksum = "0c83627bc137605acc00bb399c7b908ef460b621fc37c953db2b09f88c449ea6" 2999 | dependencies = [ 3000 | "lazy_static", 3001 | "libc", 3002 | "pkg-config", 3003 | ] 3004 | 3005 | [[package]] 3006 | name = "xcursor" 3007 | version = "0.3.4" 3008 | source = "registry+https://github.com/rust-lang/crates.io-index" 3009 | checksum = "463705a63313cd4301184381c5e8042f0a7e9b4bb63653f216311d4ae74690b7" 3010 | dependencies = [ 3011 | "nom", 3012 | ] 3013 | 3014 | [[package]] 3015 | name = "xi-unicode" 3016 | version = "0.3.0" 3017 | source = "registry+https://github.com/rust-lang/crates.io-index" 3018 | checksum = "a67300977d3dc3f8034dae89778f502b6ba20b269527b3223ba59c0cf393bb8a" 3019 | 3020 | [[package]] 3021 | name = "xml-rs" 3022 | version = "0.8.4" 3023 | source = "registry+https://github.com/rust-lang/crates.io-index" 3024 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 3025 | 3026 | [[package]] 3027 | name = "zip" 3028 | version = "0.6.3" 3029 | source = "registry+https://github.com/rust-lang/crates.io-index" 3030 | checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" 3031 | dependencies = [ 3032 | "byteorder", 3033 | "bzip2", 3034 | "crc32fast", 3035 | "crossbeam-utils", 3036 | "flate2", 3037 | "zstd", 3038 | ] 3039 | 3040 | [[package]] 3041 | name = "zstd" 3042 | version = "0.11.2+zstd.1.5.2" 3043 | source = "registry+https://github.com/rust-lang/crates.io-index" 3044 | checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" 3045 | dependencies = [ 3046 | "zstd-safe", 3047 | ] 3048 | 3049 | [[package]] 3050 | name = "zstd-safe" 3051 | version = "5.0.2+zstd.1.5.2" 3052 | source = "registry+https://github.com/rust-lang/crates.io-index" 3053 | checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" 3054 | dependencies = [ 3055 | "libc", 3056 | "zstd-sys", 3057 | ] 3058 | 3059 | [[package]] 3060 | name = "zstd-sys" 3061 | version = "2.0.1+zstd.1.5.2" 3062 | source = "registry+https://github.com/rust-lang/crates.io-index" 3063 | checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" 3064 | dependencies = [ 3065 | "cc", 3066 | "libc", 3067 | ] 3068 | --------------------------------------------------------------------------------