Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
G
general-issue-tracker
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 47
    • Issues 47
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • mu
  • general-issue-tracker
  • Issues
  • #24

Closed
Open
Opened Dec 19, 2014 by John Zhang@u5157779
  • Report abuse
  • New issue
Report abuse New issue

Native Interface (super issue)

Created by: wks

This is an outline of issues related to the native interface, that is, interacting with the native world. This topic includes but is not limited to object layout, pointer types, object pinning and foreign function calls. We should open other issues to discuss concrete problems.

  • Make a platform-specific Mu specification
    • Address some of the following issues, including object layout, calling convention, ...
    • Draft for AMD64: https://github.com/microvm/microvm-spec/wiki/native-interface-x64-unix
  • Type system: (https://github.com/microvm/microvm-meta/issues/34)
    • Raw pointer types
    • Structure types with native/explicit object layout
    • Union types (unlikely to have in Mu)
    • Mapping Mu types to C types and native object layout: (in the Native Interface chapter in the spec)
  • Memory space beyond heap/stack/global
    • Memory spaces with various constraints
      • Is it movable, pinnable, has reference, can be referenced to, GC-traced, GC-collected, ...?
    • Object pinning: https://github.com/microvm/microvm-meta/issues/28
      • If object pinning is allowed, what does "pin" mean?
  • Foreign function interfaces
    • Calling foreign functions from Mu: (The CCALL instruction. See the spec)
      • Calling C functions
      • System calls
    • Calling back to Mu from foreign functions: https://github.com/microvm/microvm-meta/issues/39
      • From C functions
      • Signal handling

The following should be addressed by a higher-level abstraction:

  • Loading native libraries
    • The client loads libc and finds the address of dlopen, dlsym, dlclose and dlerror. Then the CCALL instruction takes care of the rest by calling them.
  • Loading "heavier-weight" Mu bundles (currently called MuLF): https://github.com/microvm/microvm-meta/issues/30

The following are not related to the native interface, but are related to raw memory:

  • How to expose the address of objects so that the user can analyse the memory behaviour? (This involves profiling, too. We may open a dedicated issue for profiling.)
  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
enhancement
Assign labels
  • View project labels
Reference: mu/general-issue-tracker#24