Created
August 5, 2020 23:40
-
-
Save actondev/41067d7028051b7795b7f05c2d0f033b to your computer and use it in GitHub Desktop.
s7 wasm example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "s7.h" | |
#include <stdio.h> | |
void _s7_print_stderr(s7_scheme *sc, uint8_t c, s7_pointer port) { | |
printf("%c", c); | |
} | |
int main() { | |
printf("hello, world!\n"); | |
s7_scheme* sc = s7_init(); | |
s7_set_current_output_port(sc, s7_open_output_function(sc, _s7_print_stderr)); | |
s7_eval_c_string(sc, "(format #t \"result is ~A\n\" (+ 1 2 3))"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fantastic! Can't wait to try. :-)