Skip to content

Conversation

@expenses
Copy link
Contributor

This is still very much a draft and builds ontop of #1, but it's usable enough to get an ArResolver working, see https://github.com/expenses/usd-iroh-resolver/tree/main.

This requires compiling a cdylib and using the ctor macro to declare a type and setup the factory:

https://github.com/expenses/usd-iroh-resolver/blob/cc5303975fe084ffd7d3b6dfd8965a13621b2d44/src/lib.rs#L317-L332

One thing that should be fixed before merging is that functions are currently passed as void *s. This is not ideal but babble isn't able to parse function pointers yet.

@anderslanglands
Copy link
Owner

Ooooh I see what you're doing. That's neat. I'd done something very similar with the bbl::Superclass<C> stuff in 0.6, but I was stymied in USD on the factory/type creation part. Very neat solution. In my case I was trying to attack a custom file format first. I'll have to see if I can do the same thing there and then hopefully we can generalize this approach.

@expenses
Copy link
Contributor Author

In my case I was trying to attack a custom file format first. I'll have to see if I can do the same thing there and then hopefully we can generalize this approach.

Yep, I'l also interested in custom file formats. I believe that the exact same approach should work.

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

Successfully merging this pull request may close these issues.

2 participants