Commit d77be823 authored by Kunshan Wang's avatar Kunshan Wang

Generate Rust structs for the C API.

parent da56db93
......@@ -4,3 +4,4 @@ emit/*
Cargo.lock
*.log
*.DS_Store
*.swp
This diff is collapsed.
......@@ -35,7 +35,7 @@ def find_line(lines: List[str], substr: Predicate, start: int = 0) -> int:
if pred(lines[i], substr):
return i
raise KeyError("Not found: " + str(substr) + "\n text:" + str(lines) )
raise Exception("Not found: " + str(substr) + "\n text:" + str(lines) )
def extract_lines(parent: str, begin: Predicate, end: Predicate) -> str:
"""
......
mod api_old;
mod api_new;
mod api_c;
pub use vm::api::api_new::*;
This diff is collapsed.
import injecttools
import os.path
_my_dir = os.path.dirname(__file__)
_mu_impl_fast_root = os.path.join(_my_dir, "..", "..", "..")
def _make_injectable_file_set(m):
m2 = {os.path.join(_mu_impl_fast_root, k): v for k,v in m.items()}
return InjectableFileSet(m2)
muapi_h_path = os.path.join(_my_dir, "muapi.h")
injectable_files = injecttools.make_injectable_file_set(_mu_impl_fast_root, [
("api_c.rs", "src/vm/api/api_c.rs",
["Types", "Structs", "Enums"]),
])
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