Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Roto ready for Rotonda #49

Open
13 of 14 tasks
tertsdiepraam opened this issue Aug 12, 2024 · 0 comments
Open
13 of 14 tasks

Getting Roto ready for Rotonda #49

tertsdiepraam opened this issue Aug 12, 2024 · 0 comments

Comments

@tertsdiepraam
Copy link
Contributor

tertsdiepraam commented Aug 12, 2024

  • The big-overhaul branch needs to be merged.
  • get_function is too liberal at the moment in what it accepts. Pointer sizes should at least be checked, but it should probably be even more strict with exactly the right types.
  • get_function should tell you what went wrong, that is, if the function does not exist or which types did not match up.
  • The return type becoming the first argument when calling Roto from Rust is confusing and we should work around that. We can make wrapper functions that make that unnecessary.
  • Similarly, we should have a way to return complex values to Roto. This probably involves figuring out how that works with extern "C" functions in Rust and making sure our cranelift-generated code does that correctly.
  • Compiling a script should just be one function call (not parse, typecheck, lower & codegen separately).
  • Roto functions need a lifetime associated with the module so that they cannot live longer than the module. This can currently cause some unsoundness.
  • Either internally or externally, we should not transmute results from Roto directly to Option and Result, but to a custom Verdict type with #[repr(C)]. I'm leaning towards doing this externally, and providing methods to convert a Verdict into a Result or Option.
  • New primitives:
    • IpAddr (via StructArgument)
    • Prefix (via StructArgument)
    • ASN
  • AS numbers literals, distinct from u32.
  • Schemas and more dynamic types, see Schemas and dynamic values #62.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant