Giter Site home page Giter Site logo

Explicitly load Metal symbols about metal-rs HOT 7 OPEN

gfx-rs avatar gfx-rs commented on July 2, 2024
Explicitly load Metal symbols

from metal-rs.

Comments (7)

grovesNL avatar grovesNL commented on July 2, 2024 1

@GopherJ not yet, we might experiment with the first approach above (i.e. using weak_framework and a helper function to check if it's loaded)

from metal-rs.

grovesNL avatar grovesNL commented on July 2, 2024

If it's possible, would it make sense to use weak_framework here, and expose a helper function to check if Metal is available?

we load symbols when metal-rs objects are created (or some kind of a Metal context is initialized) instead of dynamically checking for symbols on each and every call

If we want to use libloading for this, how should this work? Would we internally share a map of function pointers?

from metal-rs.

GopherJ avatar GopherJ commented on July 2, 2024

Hi, any news on this?

from metal-rs.

GopherJ avatar GopherJ commented on July 2, 2024

@grovesNL ok thanks take your time and ping me if it's resolved, I'll be excited to test again. 😄

from metal-rs.

kvark avatar kvark commented on July 2, 2024

Would #[link(name = "Metal", kind = "weak_framework")] work?

from metal-rs.

grovesNL avatar grovesNL commented on July 2, 2024

Yeah I think something like that should work – just need to test it out

from metal-rs.

grovesNL avatar grovesNL commented on July 2, 2024

Update: I asked on the Rust Zulip and Discourse (https://users.rust-lang.org/t/how-to-use-weak-linking-on-macos-link-with-weak-framework/50732) but had no response yet

from metal-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.