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

Export interface fingerprint because whew, ABI mismatches are bad #5

Open
fasterthanlime opened this issue Dec 6, 2024 · 2 comments

Comments

@fasterthanlime
Copy link
Contributor

Just like rubicon does essentially:

lith(22234,0x200043840) malloc: *** error for object 0xc: pointer being freed was not allocated
lith(22234,0x200043840) malloc: *** set a breakpoint in malloc_error_break to debug
error: Recipe `run` failed with exit code 134
error: Recipe `serve` failed on line 51 with exit code 134

...I just need to figure out how to.. do that fingerprinting exactly? Because... I guess something would need to run in a build script I suppose. It'd be neat if it didn't depend on the dylo cli, mhh. Need to think about this.

@fasterthanlime
Copy link
Contributor Author

One possible way out of this is to flip the model on its head: instead of putting it onto the user to do #[cfg(feature = "impl")] for all "impl-only" things, maybe all exported things should be written as #[dylo::export] — it should be relatively simple to ignore function bodies from there, and that would be the module's signature.

the same transform would be done by dyld-cli, and load time, we'd simply check that they match. I'm not sure how to get the proc macro to "add to a registry" to get the complete signature of the module, but.. we'll get there.

maybe just exported symbols, something dirty like __dylo.{sha256sum}

@fasterthanlime
Copy link
Contributor Author

Oooh, https://lib.rs/crates/unsynn looks interesting to do the fingerprinting maybe

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

No branches or pull requests

1 participant