ffi: support for java native functions

This commit is contained in:
2023-09-07 01:03:01 -07:00
parent 81296ee1d1
commit 953679b859
6 changed files with 100 additions and 4 deletions

10
examples/java.pork Normal file
View File

@ -0,0 +1,10 @@
func java_system_err()
native java "java.lang.System:static-getter:err:java.io.PrintStream"
func print_stream_println(stream, line)
native java "java.io.PrintStream:virtual:println:void:java.lang.String"
export func main() {
let error = java_system_err()
print_stream_println(error, "Hello World")
}