mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 04:23:41 +00:00
all: add bare-bones Cgo support
This commit is contained in:
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
/*
|
||||
#include <stdint.h>
|
||||
int32_t fortytwo(void);
|
||||
int32_t mul(int32_t a, int32_t b);
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func main() {
|
||||
println("fortytwo:", C.fortytwo())
|
||||
println("mul:", C.mul(int32(3), 5))
|
||||
}
|
||||
Reference in New Issue
Block a user