Giter VIP home page Giter VIP logo

def_mod's People

Contributors

jezza avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

def_mod's Issues

No description, website, or topics provided.

Github repository lacks some metadata.

Should be something like

a Rust proc macro allows to forward-declare a module interface and route it to specific implementation depending on cfg.

Assert across all os specific modules.

Now, as I write this, I honestly believe it's not possible...
At least, not without a great deal of work.

I think the solution would, at the very least, involve a compiler plugin, but there's definitely some things that are working against us here.

First hurdle:
We need to look at what things a module exports.
Now, in a very simple case, we could just look at the file, inspect the contents, and determine what types and methods it exported.
Programmatically, of course.

Where things start getting difficult is when it's more complex than just exporting a type that was declared in the module.
What if someone exports a type from a library?
And that library isn't available on the given system, because it's on a different os?

Honestly, I think it's not possible simply due to how... well, logic works.
I can't access and inspect something that isn't there...

There's definite solutions that get us halfway, such as the aforementioned scraping, but that's going to be nothing more than superficial at best.

If anyone has any ideas about how to implement this nicely, or I've misunderstood accessibility, please do chime in.

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.