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

Make RuntimeBuilder agnostic to library extension #72

Closed
7 tasks done
Wodann opened this issue Dec 29, 2019 · 1 comment · Fixed by #75
Closed
7 tasks done

Make RuntimeBuilder agnostic to library extension #72

Wodann opened this issue Dec 29, 2019 · 1 comment · Fixed by #75
Assignees
Labels
good first issue Good for newcomers

Comments

@Wodann
Copy link
Collaborator

Wodann commented Dec 29, 2019

  • claim this issue (assign yourself or comment below)
  • setup repository on your local machine and make sure all tests pass (cargo test)
  • read our contributing guidelines
  • the Mun Runtime receives RuntimeOptions from the RuntimeBuilder in order to load a shared library. At the moment this library path is not platform agnostic (i.e. internally determines whether it is dealing with a *.so OR *.dll OR *.dylib file). This results in code like this (a contrived example):
    fn runtime_unix() -> Runtime {
        RuntimeBuilder::new("voxygen/src/anim/character/test.so")
            .spawn()
            .expect("Failed to spawn Runtime");
    }
    
    fn runtime_windows() -> Runtime {
        RuntimeBuilder::new("voxygen/src/anim/character/test.dll")
            .spawn()
            .expect("Failed to spawn Runtime");
    }
    Per @sonovice's submission, we want to instead generate libraries with a custom extension: *.munlib:
    fn runtime() -> Runtime {
        RuntimeBuilder::new("voxygen/src/anim/character/test.munlib")
            .spawn()
            .expect("Failed to spawn Runtime");
    }
    To implement this, you need to:
    • replace *.so / *.dll / *.dylib extensions with *.munlib in the Mun Compiler when writing to file
    • check that RuntimeBuilder::new is allowed to receive any path (both with and without extension)
  • start a Pull Request. Set description to closes #72. If this is your first PR, welcome 🎉 😄
@Wodann Wodann added the good first issue Good for newcomers label Dec 29, 2019
@legendiguess
Copy link
Contributor

I would like to contribute to this issue 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants