mirror of
https://github.com/remko/waforth
synced 2024-12-27 09:59:29 +01:00
waforthc: README updates
This commit is contained in:
parent
b69323bb1f
commit
8ec609e9f9
1 changed files with 6 additions and 2 deletions
|
@ -46,10 +46,14 @@ Instead of an interactive shell that accepts user input, you can also tell `wafo
|
||||||
$ ./hello↩
|
$ ./hello↩
|
||||||
Hello, Forth
|
Hello, Forth
|
||||||
|
|
||||||
|
If you want an optimized binary, you can pass extra C compiler flags to the build:
|
||||||
|
|
||||||
|
$ waforthc --ccflag=-O2 --output=hello --init=SAY_HELLO hello.fs↩
|
||||||
|
|
||||||
Contrary to the [standalone native WAForth](https://github.com/remko/waforth/tree/master/src/standalone), the resulting binary does not contain a WebAssembly engine, and therefore the compiler infrastructure is no longer available:
|
Contrary to the [standalone native WAForth](https://github.com/remko/waforth/tree/master/src/standalone), the resulting binary does not contain a WebAssembly engine, and therefore the compiler infrastructure is no longer available:
|
||||||
|
|
||||||
$ ls -l hello↩
|
$ ls -l hello↩
|
||||||
-rwxr-xr-x 1 remko remko 159k Nov 11 13:18 hello
|
-rwxr-xr-x 1 remko remko 116k Nov 11 13:18 hello
|
||||||
|
|
||||||
$ ./hello↩
|
$ ./hello↩
|
||||||
: SAY_BYE ." Bye" CR ;
|
: SAY_BYE ." Bye" CR ;
|
||||||
|
@ -57,7 +61,7 @@ Contrary to the [standalone native WAForth](https://github.com/remko/waforth/tre
|
||||||
|
|
||||||
If you have a cross-compiling C compiler, you can also cross-compile your Forth program to a different architecture:
|
If you have a cross-compiling C compiler, you can also cross-compile your Forth program to a different architecture:
|
||||||
|
|
||||||
$ waforthc --cc=arm-linux-gnueabi-gcc --ccflag=-static --output=hello --init=SAY_HELLO hello.fs↩
|
$ waforthc --cc=arm-linux-gnueabi-gcc --ccflag=-static --ccflag=-O2 --output=hello --init=SAY_HELLO hello.fs↩
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue