WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.2% of users enabled 2FA.

Commit 8739b1c2 authored by Kunshan Wang's avatar Kunshan Wang
Browse files

Skeleton of C-initiating-style C binding.

parent 7a574230
......@@ -39,4 +39,18 @@ lazy val root = (project in file(".")).settings(
antlr4GenVisitor in Antlr4 := false
lazy val jarList = taskKey[Seq[File]]("list dependency jars")
jarList := {
val cp: Seq[File] = (dependencyClasspath in Compile).value.files
lazy val makeJarListFile = taskKey[Unit]("write a list of dependency jar paths separated by colons (:) to target/jars.txt")
makeJarListFile := {
val jl = jarList.value
val jlStr = jl.mkString(":")
println("Dependency jars: " + jlStr)
IO.write(new java.io.File("cbinding/jars.txt"), jlStr)
CFLAGS += -std=gnu11
ifndef JAVA_HOME
$(error JAVA_HOME is required. Invoke with 'make JAVA_HOME=/path/to/java/home')
.PHONY: all
all: libmurefimpl2start.so
libmurefimpl2start.so: refimpl2-start.c cbinding.txt
$(CC) -fPIC -shared $(CFLAGS) -o $@ $< $(LDFLAGS)
cbinding.txt: ../build.sbt
cd .. ; sbt makeJarListFile
.PHONY: clean
rm *.so
#include <stdint.h>
#include <stdlib.h>
#include "refimpl2-start.h"
MuVM *mu_refimpl2_new() {
return NULL;
MuVM *mu_refimpl2_new_ex(int64_t heap_size, int64_t global_size, int64_t stack_size) {
return NULL;
void mu_refimpl2_close(MuVM *mvm) {
#ifndef __REFIMPL2_START_H__
#define __REFIMPL2_START_H__
#include <stdint.h>
#include "muapi.h"
#ifdef __cplusplus
extern "C" {
MuVM *mu_refimpl2_new();
MuVM *mu_refimpl2_new_ex(int64_t heap_size, int64_t global_size, int64_t stack_size);
void mu_refimpl2_close(MuVM *mvm);
#ifdef __cplusplus
#endif // __REFIMPL2_START_H__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment