forked from rebolsource/r3
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrebol3.nest
1906 lines (1778 loc) · 48.6 KB
/
rebol3.nest
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;- .-.
;- /'v'\ SISKIN-Builder project file
;- (/uOu\) https://github.com/Siskin-framework/Builder/
;-===="="=======================================================================
name: %Rebol
group: %rebol
product: Base ; default product.. the others are by include: Core or Bulk
strip: on
root: %../
source: %src/
include: %src/include/
temp: %make/tmp/
;output: %build/
stack-size: 4194304 ;= 4MB (4 * 1024 * 1024)
optimize: 2
version: 3.18.2
#if Linux? [ defines: TO_LINUX ]
#if macOS? [ defines: TO_MACOS ]
#if (system/platform = 'haiku) [ defines: TO_HAIKU ]
#if Windows? [ defines: TO_WINDOWS ]
#if OpenBSD? [ defines: TO_OPENBSD ]
#if FreeBSD? [ defines: TO_FREEBSD ]
#if (system/platform = 'NetBSD) [ defines: TO_NETBSD ]
#if (system/platform = 'Turris) [ defines: TO_LINUX ]
#if (system/platform = 'DragonFlyBSD) [ defines: TO_DRAGONFLYBSD ]
#if Posix? [ clfag: -Wno-pointer-sign ] ;@@ Review these warnings and fix them!
target-windows: [
os: windows
sys: win32
vendor: pc
platform: Windows
compiler: clang
upx: on
]
target-macos: [
os: macos
sys: darwin
vendor: apple
platform: macOS
compiler: clang
]
target-linux: [
os: linux
sys: linux
platform: Linux
vendor: pc
compiler: gcc
library: %dl
]
target-openbsd: [
os: openbsd
sys: openbsd
platform: OpenBSD
vendor: pc
compiler: clang
]
target-freebsd: [
os: freebsd
sys: freebsd
platform: FreeBSD
vendor: pc
compiler: clang
]
target-netbsd: [
os: netbsd
sys: netbsd
platform: NetBSD
vendor: pc
compiler: gcc
]
target-dragonflybsd: [
os: dragonflybsd
sys: dragonflybsd
platform: DragonFlyBSD
vendor: pc
compiler: clang
]
target-haiku: [
os: haiku
sys: haiku
platform: Haiku
vendor: pc
compiler: clang
library: [%network %iconv]
defines: [ENDIAN_LITTLE USE_OLD_PIPE]
]
target-turris: [
os: turris
sys: linux
platform: Turris
vendor: pc
compiler: gcc
]
#if Linux? [
cross-haiku-x86: [
compiler: %/tools/cross-tools-x86/bin/i586-pc-haiku-gcc
library: %/system/lib/
flag: "--sysroot=/tools/cross-tools-x86/sysroot"
:target-haiku
:make-x86-exe
]
cross-haiku-x64: [
compiler: %/tools/cross-tools-x86_64/bin/x86_64-unknown-haiku-gcc
library: %/system/lib/
flag: "--sysroot=/tools/cross-tools-x86_64/sysroot"
:target-haiku
:make-x64-exe
]
cross-linux-gnueabi: [
;- requires: sudo apt-get install gcc-arm-linux-gnueabi
compiler: %/usr/bin/arm-linux-gnueabi-gcc
library: %/usr/arm-linux-gnueabi/lib/
:target-linux
arch: armv6
]
cross-linux-gnueabihf: [
;- requires: sudo apt-get install gcc-arm-linux-gnueabihf
compiler: %/usr/bin/arm-linux-gnueabihf-gcc
library: %/usr/arm-linux-gnueabihf/lib/
:target-linux
arch: armv7
]
cross-linux-aarch64: [
;- requires: sudo apt-get install gcc-aarch64-linux-gnu
compiler: %/usr/bin/aarch64-linux-gnu-gcc
library: %/usr/aarch64-linux-gnu/lib/
:target-linux
:arch-x64
arch: arm64
]
cross-linux-riscv64: [
;- requires: sudo apt-get install gcc-riscv64-linux-gnu
compiler: %/usr/bin/riscv64-linux-gnu-gcc
library: %/usr/riscv64-linux-gnu/lib/
:target-linux
:arch-x64
arch: riscv64
]
]
core-files: [
%core/a-constants.c
%core/a-globals.c
%core/a-lib.c
%core/b-boot.c
%core/b-init.c
%core/c-do.c
%core/c-error.c
%core/c-frame.c
%core/c-function.c
%core/c-handle.c
%core/c-port.c
%core/c-task.c
%core/c-word.c
%core/d-crash.c
%core/d-dump.c
%core/d-print.c
%core/f-blocks.c
%core/f-deci.c
%core/f-dtoa.c
%core/f-enbase.c
%core/f-extension.c
%core/f-int.c
%core/f-math.c
%core/f-modify.c
%core/f-qsort.c
%core/f-random.c
%core/f-round.c
%core/f-series.c
%core/f-stubs.c
%core/l-scan.c
%core/l-types.c
%core/m-gc.c
%core/m-pools.c
%core/m-series.c
; %core/n-audio.c ;not implemented
%core/n-control.c
; %core/n-crypt.c ;optional, use: include-cryptography
%core/n-data.c
; %core/n-draw.c ;old source
; %core/n-graphics.c ;old source
%core/n-hash.c
; %core/n-image.c ;optional, use: include-image-natives
%core/n-io.c
%core/n-loop.c
%core/n-math.c
%core/n-sets.c
%core/n-strings.c
%core/n-system.c
; %core/p-audio.c ;optional, use: include-audio
%core/p-checksum.c
; %core/p-clipboard.c ;optional, use: include-clipboard (windows only!)
%core/p-console.c
%core/p-dir.c
%core/p-dns.c
%core/p-event.c
%core/p-file.c
%core/p-net.c
; %core/p-midi.c ;optional, use: include-midi
; %core/p-serial.c ;optional, use: include-serial
; %core/p-timer.c ;not implemented
%core/s-cases.c
%core/s-crc.c
%core/s-file.c
%core/s-find.c
%core/s-make.c
%core/s-mold.c
%core/s-ops.c
%core/s-trim.c
%core/s-unicode.c
%core/t-bitset.c
%core/t-block.c
%core/t-char.c
%core/t-datatype.c
%core/t-date.c
%core/t-decimal.c
%core/t-event.c
%core/t-function.c
%core/t-gob.c
%core/t-handle.c
%core/t-image.c
%core/t-integer.c
%core/t-logic.c
%core/t-map.c
%core/t-money.c
%core/t-none.c
%core/t-object.c
%core/t-pair.c
%core/t-port.c
%core/t-string.c
%core/t-struct.c
%core/t-time.c
%core/t-tuple.c
%core/t-typeset.c
%core/t-utype.c
%core/t-vector.c
%core/t-word.c
; %core/u-aes.c ;optional, use: include-cryptography
; %core/u-bigint.c ;needed for RSA which is needed in TLS protocol (HTTPS)
; %core/u-bmp.c ;optional, use: include-native-bmp-codec
; %core/u-bincode.c ;optional, but required in many core functions
; %core/u-chacha20.c ;optional, use: include-cryptography
%core/u-compress.c
; %core/u-dh.c ;optional, use: include-cryptography
; %core/u-dialect.c ;optional, use: include-dialecting (delect)
; %core/u-gif.c ;optional, use: include-native-gif-codec
; %core/u-iconv.c ;optional, use: include-iconv
; %core/u-image-resize.c ;optional, use: include-image-natives
; %core/u-jpg.c ;optional, use: include-native-jpg-codec
; %core/u-lzma.c ;optional, use: include-lzma-compression
%core/u-parse.c
; %core/u-png.c ;optional, use: include-native-png-codec
; %core/u-poly1305.c ;optional, use: include-cryptography
; %core/u-rc4.c ;optional, use: include-cryptography
; %core/u-rsa.c ;optional, use: include-cryptography
; %core/u-uECC.c ;optional, use: include-cryptography
%core/u-zlib.c
; %core/u-wav.c ;optional, use: include-native-wav-codec
%core/u-mbedtls.c
%core/mbedtls/platform.c
%core/mbedtls/platform_util.c
; %core/mbedtls/ripemd160.c ;use: include-optional-checksums
%core/mbedtls/sha1.c
%core/mbedtls/sha256.c
%core/mbedtls/sha512.c
; %core/mbedtls/md4.c ;use: include-optional-checksums
%core/mbedtls/md5.c
;- deprecated checksum implementations replaced by mbedtls
; %core/deprecated/u-sha1.c
; %core/deprecated/u-sha2.c
; %core/deprecated/u-md5.c
]
host-files: [
%os/host-main.c
%os/host-args.c
%os/host-device.c
%os/host-stdio.c
%os/dev-net.c
%os/dev-dns.c
; %os/dev-checksum.c
; %os/host-ext-sokol.c
; %os/host-view.c
#if Windows? [
%os/win32/host-lib.c
%os/win32/dev-stdio.c
%os/win32/dev-file.c
%os/win32/dev-event.c
; %os/win32/dev-clipboard.c
; %os/win32/dev-audio.c
; %os/win32/dev-serial.c
; %os/win32/host-event.c
; %os/win32/host-window.c
; %os/win32/host-graphics.c
; %os/win32/host-compositor.c
]
#if Posix? [
%os/posix/host-lib.c
%os/posix/host-readline.c
;%os/posix/host-window.c
%os/posix/dev-file.c
%os/posix/dev-stdio.c
%os/posix/dev-event.c
;%os/posix/dev-serial.c
]
]
host-files-view: [
#if Windows? [
%os/win32/sys-utils.c
%os/win32/sys-codecs.cpp
%os/win32/sys-d2d.cpp
;%os/win32/host-image.c
;%win32/sys-codecs-ini.c
%os/win32/host-event.c
%os/win32/host-window.c
;%os/win32/host-graphics.c
%os/win32/host-compositor.c
]
]
mezz-base-files: [
;-- base: low-level boot in lib context:
%mezz/base-constants.reb
%mezz/base-funcs.reb
%mezz/base-series.reb
%mezz/base-files.reb
%mezz/base-debug.reb
%mezz/base-defs.reb
%mezz/base-collected.reb ; contains automatically collected code from C files
]
mezz-sys-files: [
;-- sys: low-level sys context:
%mezz/sys-base.reb
%mezz/sys-ports.reb
%mezz/sys-codec.reb ; export to lib!
%mezz/sys-load.reb
%mezz/sys-start.reb
]
mezz-lib-files: [
;-- lib: mid-level lib context:
%mezz/mezz-secure.reb
%mezz/mezz-types.reb
%mezz/mezz-func.reb
%mezz/mezz-debug.reb
%mezz/mezz-control.reb
%mezz/mezz-save.reb
%mezz/mezz-series.reb
%mezz/mezz-files.reb
%mezz/mezz-shell.reb
%mezz/mezz-math.reb
%mezz/mezz-help.reb ; move dump-obj!
%mezz/mezz-banner.reb
; %mezz/mezz-colors.reb ; include-mezz-colors
; %mezz/mezz-date.reb ; Internet date support, include-mezz-date
; %mezz/mezz-tag.reb ; build-tag
%mezz/mezz-tail.reb
; %mezz/codec-unixtime.reb
;-- cryptographic
; %mezz/codec-utc-time.reb ; include-prot-https
; %mezz/codec-pkix.reb
; %mezz/codec-der.reb ; include-prot-https
; %mezz/codec-crt.reb ; include-prot-https
; %mezz/codec-ppk.reb
; %mezz/codec-ssh-key.reb
;-- compression
; %mezz/codec-gzip.reb
; %mezz/codec-zip.reb
; %mezz/codec-tar.reb
;-- other
; %mezz/codec-bbcode.reb
; %mezz/codec-json.reb
; %mezz/codec-xml.reb
; %mezz/codec-html-entities.reb
; %mezz/codec-wav.reb
; %mezz/codec-pdf.reb
; %mezz/codec-swf.reb
; %mezz/codec-image.reb ; included using: include-image-os-codec (windows and macos only so far)
; %mezz/codec-image-ext.reb ; image codec extensions (codecs/png/size?)
]
mezz-prot-files: [
;-- protocols:
; %mezz/prot-http.reb
; %mezz/prot-tls.reb
; %mezz/prot-whois.reb
; %mezz/prot-mysql.reb
]
boot-host-files: [] ; may be used for custom boot script
config: [ ;- this is list of configuration (optional) defines
INCLUDE_MBEDTLS ;- replaced original checksum implementations
COLOR_CONSOLE ;- use ANSI escape sequences in prompt and results
DEBUG_HASH_COLLISIONS
;*** Unfinished features **************************************************/
INCLUDE_TASK ;- tasks are not implemented yet, so include it only on demand
;*** Other (not recommanded) options **************************************/
;HAS_WIDGET_GOB ;- used in t-gob.c
;EXCLUDE_CHACHA20POLY1305 ; don't include chacha20 and poly1305 cipher/authentication code
;USE_EMPTY_HASH_AS_NONE ; a single # means NONE, else error; Used in l-scan.c file
;DO_NOT_NORMALIZE_MAP_KEYS
; with above define you would get:
; [a b:] = keys-of make map! [a 1 b: 2]
; [a 1 b: 2] = body-of make map! [a 1 b: 2]
;
; else:
; [a b] = keys-of make map! [a 1 b: 2]
; [a: 1 b: 2] = body-of make map! [a 1 b: 2]
;FORCE_ANSI_ESC_EMULATION_ON_WINDOWS ; would not try to use MS' built-in VIRTUAL_TERMINAL_PROCESSING
;EXCLUDE_VECTOR_MATH ; don't include vector math support (like: 3 * #[vector! integer! 8 3 [1 2 3]]); Used in t-vector.c file
;WRITE_ANY_VALUE_TO_CLIPBOARD ; https://github.com/Oldes/Rebol-issues/issues/1619
;CONSTRUCT_LIT_WORD_AS_WORD ; https://github.com/Oldes/Rebol-issues/issues/2502
;SERIES_LABELS ; used for special debug purposes
;SHOW_SIZEOFS ; for debugging ports to some new systems
;SHOW_EXPAND_STACK ; will print info when stack expands
;NDEBUG ; removes some asserts
;TEST_SCAN
;_DEBUG
;ALEVEL=2 ; maximal assert level
;*** Memory pool special defines (were not used!) *************************/
; these were found in sources, but never actually used...
;CHAFF ; Fill series data to crash old references (crashes at start, so hard to say, if it's ok)
;MUNGWALL ; "MungWall"-style sentinels for REBNODEs (missing Mung_Check function, not ok!) Amiga only?
]
;-------------------------------------------------------------------------------
;- Include definitions (for fine-tunning products)
;-------------------------------------------------------------------------------
;- image related natives and codecs:
include-image-natives: [
; image related native functions like:
; `hsv-to-rgb`, `rgb-to-hsv`, `tint`, `resize`, `premultiply`, `blur`
; on Windows also: `image` as common entry to os image codec (if enabled)
config: INCLUDE_IMAGE_NATIVES
core-files: %core/n-image.c
core-files: %core/u-image-resize.c
core-files: %core/u-image-blur.c
]
include-native-bmp-codec: [config: INCLUDE_BMP_CODEC core-files: %core/u-bmp.c]
include-native-png-codec: [config: INCLUDE_PNG_CODEC core-files: %core/u-png.c]
include-native-qoi-codec: [config: INCLUDE_QOI_CODEC core-files: %core/u-qoi.c]
include-native-jpg-codec: [config: INCLUDE_JPG_CODEC core-files: %core/u-jpg.c]
include-native-gif-codec: [config: INCLUDE_GIF_CODEC core-files: %core/u-gif.c]
include-codec-rebin: [config: INCLUDE_REBIN_CODEC core-files: %core/u-rebin.c]
;@@ on Windows it's better to use system image codec (ability to use more types)
include-image-os-codec: [
config: INCLUDE_IMAGE_OS_CODEC
mezz-lib-files: %mezz/codec-image.reb
#if Windows? [
host-files: %os/win32/host-image.c
]
#if MacOS? [
host-files: [
%os/osx/host-image.c
%os/osx/sys-codecs.m
%os/osx/sys-utils.m
]
frameworks: [CoreGraphics CoreImage ImageIO Foundation]
]
]
include-image-codecs: [
#if Windows? [
:include-image-os-codec
]
#if MacOS? [
:include-image-os-codec
]
#if (find [Linux OpenBSD FreeBSD NetBSD Turris] system/platform) [
:include-native-bmp-codec
:include-native-png-codec
:include-native-jpg-codec
:include-native-gif-codec
]
:include-native-qoi-codec
mezz-lib-files: %mezz/codec-image-ext.reb ; png/size? function and similar
]
;- native devices:
include-clipboard: [
#if Windows? [
config: INCLUDE_CLIPBOARD
core-files: %core/p-clipboard.c
host-files: %os/win32/dev-clipboard.c
]
#if macOS? [
config: INCLUDE_CLIPBOARD
core-files: %core/p-clipboard.c
host-files: %os/osx/dev-clipboard.c
host-files: %os/osx/sys-clipboard.m
host-files: %os/osx/sys-utils.m
framework: AppKit
]
]
include-midi: [
#if Windows? [
core-files: %core/p-midi.c
host-files: %os/win32/dev-midi.c
mezz-sys-files: %mezz/sys-ports-midi.reb
config: INCLUDE_MIDI_DEVICE
library: %winmm
]
#if macOS? [
core-files: %core/p-midi.c
host-files: %os/osx/dev-midi.c
mezz-sys-files: %mezz/sys-ports-midi.reb
config: INCLUDE_MIDI_DEVICE
frameworks: [CoreServices CoreMIDI]
]
#if Linux? [
; there is no support yet
]
#if OpenBSD? [
; there is no support yet
]
]
include-serial: [
#if (find [windows linux] system/platform) [
core-files: %core/p-serial.c
config: INCLUDE_SERIAL_DEVICE
]
#if Windows? [
host-files: %os/win32/dev-serial.c
]
#if Linux? [
host-files: %os/posix/dev-serial.c
]
]
include-audio: [
#if Windows? [
core-files: %core/p-audio.c
host-files: %os/win32/dev-audio.c
mezz-sys-files: %mezz/sys-ports-audio.reb
config: INCLUDE_AUDIO_DEVICE
]
]
;- native utilities:
include-bincode: [core-files: %core/u-bincode.c]
include-dialecting: [core-files: %core/u-dialect.c config: INCLUDE_DELECT]
include-iconv: [
core-files: %core/u-iconv.c
#if macOS? [
library: %iconv
]
#if (find [OpenBSD FreeBSD NetBSD DragonFlyBSD] system/platform) [
include: %/usr/local/include
library: %/usr/local/lib/
library: %iconv
]
]
;- native cryptography:
include-cipher-camelia: [
core-files: %core/mbedtls/camellia.c
config: MBEDTLS_CAMELLIA_C
]
include-cipher-aria: [
core-files: %core/mbedtls/aria.c
config: MBEDTLS_ARIA_C
]
include-cipher-chacha20: [
; costs cca 3kB uncompressed
core-files: %core/mbedtls/chacha20.c
config: MBEDTLS_CHACHA20_C
]
include-cipher-chachapoly: [
core-files: %core/mbedtls/chachapoly.c
core-files: %core/mbedtls/poly1305.c
config: MBEDTLS_CHACHAPOLY_C
config: MBEDTLS_POLY1305_C
]
include-cipher-mode-gcm: [
core-files: %core/mbedtls/gcm.c
; GCM runs with multiple ciphers and internally uses the generic wrapper
core-files: %core/mbedtls/cipher.c
core-files: %core/mbedtls/cipher_wrap.c
config: MBEDTLS_GCM_C
]
include-cipher-mode-ccm: [
core-files: %core/mbedtls/ccm.c
; CCM runs with multiple ciphers and internally uses the generic wrapper
core-files: %core/mbedtls/cipher.c
core-files: %core/mbedtls/cipher_wrap.c
config: MBEDTLS_CCM_C
]
include-cipher-mode-cbc: [
; costs cca 1.5kB uncompressed (for AES)
config: MBEDTLS_CIPHER_MODE_CBC
]
include-deprecated-cipher-aes: [
; costs cca 5kB uncompressed
config: INCLUDE_AES_DEPRECATED
include: %src/include/deprecated/
core-files: %core/deprecated/u-aes.c
core-files: %core/deprecated/n-crypt-aes.c
]
include-deprecated-cipher-chacha20: [
; costs cca 10kB uncompressed
config: INCLUDE_CHACHA20POLY1305_DEPRECATED
include: %src/include/deprecated/
core-files: %core/deprecated/u-chacha20.c
core-files: %core/deprecated/u-poly1305.c
core-files: %core/deprecated/n-crypt-chacha.c
]
include-rsa: [
; costs cca 12kB uncompressed
config: INCLUDE_RSA
core-files: %core/mbedtls/rsa.c
core-files: %core/mbedtls/rsa_alt_helpers.c
]
include-rc4: [
; costs cca 0.5kB uncompressed
config: INCLUDE_RC4
core-files: %core/u-rc4.c
]
include-curves-sec1: [
; curves defined by FIPS 186-4 and SEC1
config: MBEDTLS_ECP_DP_SECP192R1_ENABLED ; costs 2kB
config: MBEDTLS_ECP_DP_SECP224R1_ENABLED ; costs 2.5kB
config: MBEDTLS_ECP_DP_SECP256R1_ENABLED ; costs 2.5kB
config: MBEDTLS_ECP_DP_SECP384R1_ENABLED
config: MBEDTLS_ECP_DP_SECP521R1_ENABLED
]
include-curves-koblitz: [
; "Koblitz" curves
config: MBEDTLS_ECP_DP_SECP192K1_ENABLED
config: MBEDTLS_ECP_DP_SECP224K1_ENABLED
config: MBEDTLS_ECP_DP_SECP256K1_ENABLED
]
include-curves-brainpool: [
; "Brainpool" curves
config: MBEDTLS_ECP_DP_BP256R1_ENABLED
config: MBEDTLS_ECP_DP_BP384R1_ENABLED
config: MBEDTLS_ECP_DP_BP512R1_ENABLED
]
include-curves-x: [
config: MBEDTLS_ECP_DP_CURVE25519_ENABLED ; costs 7.6kB
config: MBEDTLS_ECP_DP_CURVE448_ENABLED ; costs 7.6kB; together with CURVE25519 8.1!
]
include-cryptography: [
; so far cca 183kB uncompressed (basic AES, all ellyptic curves, rsa, rc4, bignum, entropy )
config: INCLUDE_CRYPTOGRAPHY
#if Windows? [
library: %Bcrypt ;; used by mbedtls_platform_entropy_poll
]
config: MBEDTLS_CTR_DRBG_C ; The CTR_DRBG AES-based random generator.
config: MBEDTLS_AES_C ; The AES block cipher.
config: MBEDTLS_DHM_C ; The Diffie-Hellman-Merkle module.
config: MBEDTLS_ECDSA_C ; The elliptic curve DSA library.
config: MBEDTLS_ECP_C ; The elliptic curve over GF(p) library.
config: MBEDTLS_ECDH_C ; The elliptic curve Diffie-Hellman library.
config: MBEDTLS_BIGNUM_C ; The multi-precision integer library. Required for: RSA, ECDSA, ECP, DHM
config: MBEDTLS_ENTROPY_C ; The platform-specific entropy code.
config: MBEDTLS_OID_C ; Required for RSA
config: MBEDTLS_PKCS1_V15
core-files: [
%core/n-crypt.c
%core/p-crypt.c
%core/mbedtls/aes.c
%core/mbedtls/asn1parse.c
%core/mbedtls/asn1write.c
%core/mbedtls/dhm.c
%core/mbedtls/md.c
%core/mbedtls/oid.c
%core/mbedtls/bignum.c
%core/mbedtls/bignum_core.c
%core/mbedtls/constant_time.c
%core/mbedtls/ctr_drbg.c
%core/mbedtls/entropy.c
%core/mbedtls/entropy_poll.c
%core/mbedtls/ecdh.c
%core/mbedtls/ecdsa.c
%core/mbedtls/ecp.c
%core/mbedtls/ecp_curves.c
%core/mbedtls/hash_info.c
]
:include-curves-sec1
:include-rsa
:include-cipher-mode-gcm ; By default just GCM as it is the most secure.
:include-codec-crt
:include-codec-der
:include-codec-pkix
:include-codec-ppk
:include-codec-ssh-key
:include-codec-safe
]
include-cryptography-bulk: [
:include-curves-koblitz
:include-curves-brainpool
:include-curves-x
:include-cipher-mode-ccm
:include-cipher-mode-cbc
:include-rc4
:include-cipher-aria
:include-cipher-camelia
:include-cipher-chacha20
:include-cipher-chachapoly
]
include-cryptography-deprecated: [
;@@ This should not be used anymore, but keeping it here just in case...
%core/deprecated/u-bigint.c ;needed for RSA abd DH which is needed in TLS protocol (HTTPS)
%core/deprecated/u-dh.c
%core/deprecated/u-poly1305.c
%core/deprecated/u-rsa.c
%core/deprecated/u-uECC.c
:include-deprecated-cipher-chacha20
:include-deprecated-cipher-aes
]
;- native additional checksums:
include-optional-checksums: [
config: INCLUDE_MD4 ; checksum: MD4 (unsecure)
config: INCLUDE_RIPEMD160 ; checksum: RIPE-MD-160 (requires INCLUDE_MBEDTLS)
config: INCLUDE_SHA224
config: INCLUDE_SHA384
config: INCLUDE_SHA3 ; checksum: SHA3-224, SHA3-256, SHA3-384 and SHA3-512
core-files: [
%core/mbedtls/md4.c
%core/mbedtls/ripemd160.c
%core/mbedtls/sha3.c
]
]
include-base85-encoding: [
; adds support for enbase/debase with base 85 (ASCII85)
config: INCLUDE_BASE85
]
include-base36-encoding: [
config: INCLUDE_BASE36
]
include-xxhash: [
config: INCLUDE_XXHASH
file: %core/u-xxhash.c
]
;- native additional compressions:
include-lzma-compression: [
config: INCLUDE_LZMA
core-files: %core/u-lzma.c
]
include-lzw-compression: [
config: INCLUDE_LZW
core-files: %core/u-lzw.c
]
include-crush-compression: [
config: INCLUDE_CRUSH
core-files: %core/u-crush.c
]
include-brotli-compression: [
config: INCLUDE_BROTLI
include: %src/include/brotli/
core-files: [
%core/brotli/common/constants.c
%core/brotli/common/context.c
%core/brotli/common/transform.c
%core/brotli/common/dictionary.c
%core/brotli/common/shared_dictionary.c
%core/brotli/dec/state.c
%core/brotli/dec/huffman.c
%core/brotli/dec/decode.c
%core/brotli/dec/bit_reader.c
%core/brotli/enc/backward_references.c
%core/brotli/enc/backward_references_hq.c
%core/brotli/enc/bit_cost.c
%core/brotli/enc/block_splitter.c
%core/brotli/enc/brotli_bit_stream.c
%core/brotli/enc/cluster.c
%core/brotli/enc/command.c
%core/brotli/enc/compound_dictionary.c
%core/brotli/enc/compress_fragment.c
%core/brotli/enc/compress_fragment_two_pass.c
%core/brotli/enc/dictionary_hash.c
%core/brotli/enc/encode.c
%core/brotli/enc/encoder_dict.c
%core/brotli/enc/entropy_encode.c
%core/brotli/enc/fast_log.c
%core/brotli/enc/histogram.c
%core/brotli/enc/literal_cost.c
%core/brotli/enc/memory.c
%core/brotli/enc/metablock.c
%core/brotli/enc/static_dict.c
%core/brotli/enc/utf8_util.c
]
]
include-png-filter-native: [
config: INCLUDE_PNG_FILTER
core-files: %core/u-png-filter.c
]
include-view: [
; currently only on Windows!
host-files: :host-files-view
#if Windows? [
define: REB_VIEW
:include-image-os-codec
libraries: [
%Gdi32
%Msimg32 ;- for AlphaBlend
%Ole32 %OleAut32 %Comctl32 ;- for native widgets & COM access
%UxTheme ;- used for visual defaults
;%opengl32 %glu32 ;- OpenGL
;%Shell32 ;- for drag and drop (DragQueryPoint, DragQueryFileW, DragFinish, DragAcceptFiles)
]
]
]
;- native tests:
include-test-extension: [
host-files: %os/host-ext-test.c
define: TEST_EXTENSIONS ;@@TODO: rename!
]
;- native experimantal code:
include-native-wav-codec: [
; native WAV codec was just a prove of concept, don't use it
; there is more feature full Rebol implementation instead
core-files: %core/u-wav.c
config: INCLUDE_WAV_CODEC
]
;- Mezzanine level includes
; crypto codecs:
include-codec-crt: [
:include-codec-pkix
:include-codec-der
mezz-lib-files: %mezz/codec-crt.reb
]
include-codec-der: [mezz-lib-files: %mezz/codec-der.reb ]
include-codec-pkix: [mezz-lib-files: %mezz/codec-pkix.reb ]
include-codec-ppk: [mezz-lib-files: %mezz/codec-ppk.reb ]
include-codec-ssh-key: [mezz-lib-files: %mezz/codec-ssh-key.reb ]
include-codec-safe: [mezz-lib-files: %mezz/codec-safe.reb ]
; compression codecs:
include-codec-gzip: [mezz-lib-files: %mezz/codec-gzip.reb ]
include-codec-zip: [mezz-lib-files: %mezz/codec-zip.reb ]
include-codec-tar: [mezz-lib-files: %mezz/codec-tar.reb ]
include-codec-ar: [mezz-lib-files: %mezz/codec-ar.reb ]
; other codecs:
include-codec-bbcode: [mezz-lib-files: %mezz/codec-bbcode.reb ]
include-codec-html-entities: [mezz-lib-files: %mezz/codec-html-entities.reb]
include-codec-ico: [
; at this moment ico can be encoded only from pngs!
;:include-native-png-codec
mezz-lib-files: %mezz/codec-ico.reb
]
include-codec-csv: [mezz-lib-files: %mezz/codec-csv.reb ]
include-codec-json: [mezz-lib-files: %mezz/codec-json.reb ]
include-codec-xml: [mezz-lib-files: %mezz/codec-xml.reb ]
include-codec-pdf: [mezz-lib-files: %mezz/codec-pdf.reb :include-png-filter-native] ; pdf may use special png pre-compression
include-codec-plist: [mezz-lib-files: %mezz/codec-plist.reb ]
include-codec-swf: [mezz-lib-files: %mezz/codec-swf.reb ]
include-codec-wav: [mezz-lib-files: %mezz/codec-wav.reb ]
include-codec-unixtime: [mezz-lib-files: %mezz/codec-unixtime.reb ]
; mezzanines:
include-mezz-ansi: [mezz-lib-files: %mezz/mezz-ansi.reb ]
include-mezz-date: [mezz-lib-files: %mezz/mezz-date.reb ]
include-mezz-colors: [mezz-lib-files: %mezz/mezz-colors.reb ]
; protocols:
include-prot-whois: [mezz-prot-files: %mezz/prot-whois.reb ]
include-prot-mysql: [mezz-prot-files: %mezz/prot-mysql.reb ]
include-prot-daytime: [mezz-prot-files: %mezz/prot-daytime.reb ]
include-prot-https: [mezz-prot-files: %mezz/prot-http.reb :include-prot-tls]
include-prot-tls: [
:include-bincode
:include-cryptography
mezz-lib-files: %mezz/codec-utc-time.reb
mezz-lib-files: %mezz/codec-der.reb
mezz-lib-files: %mezz/codec-crt.reb
mezz-prot-files: %mezz/prot-tls.reb
]
include-mail: [
:include-prot-tls
mezz-prot-files: %mezz/prot-smtp.reb
mezz-prot-files: %mezz/prot-pop3.reb
mezz-lib-files: %mezz/prot-mail.reb
mezz-lib-files: %mezz/codec-mime-field.reb
mezz-lib-files: %mezz/codec-mime-types.reb
mezz-lib-files: %mezz/codec-quoted-printable.reb
]
include-prebol: [mezz-lib-files: %modules/prebol.reb ]
include-native-oid: [core-files: %core/n-oid.c] ; `form-oid` native (used in DER codec)
;- Product specifications
include-rebol-core: [
:include-mezz-ansi
:include-clipboard
:include-cryptography
:include-bincode
:include-iconv
:include-xxhash
:include-mail
:include-prot-https
:include-codec-unixtime
:include-codec-ar
:include-codec-gzip
:include-codec-zip
:include-codec-tar
:include-codec-json
:include-mezz-date
;:include-codec-rebin ;not yet ready!
config: INCLUDE_SHA224
config: INCLUDE_SHA384
product: Core
]
include-rebol-bulk: [
:include-rebol-core
:include-optional-checksums
:include-image-natives
:include-lzma-compression
:include-lzw-compression
:include-brotli-compression
:include-crush-compression
:include-base36-encoding
:include-base85-encoding
:include-view
:include-audio
:include-midi
:include-serial
; Extended crypto features
:include-cryptography-bulk
:include-codec-pdf
:include-codec-swf
:include-codec-gzip
:include-codec-zip
:include-codec-tar
:include-codec-bbcode
:include-codec-html-entities
:include-codec-csv
:include-codec-xml
:include-codec-wav
:include-codec-ico
:include-codec-plist
:include-image-codecs ; use other optional image codecs before this include!
:include-mezz-colors