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

feat: add MOZJS_MIRROR and MOZJS_CREATE_MIRROR env variables #443

Closed
wants to merge 10 commits into from
Closed

feat: add MOZJS_MIRROR and MOZJS_CREATE_MIRROR env variables #443

wants to merge 10 commits into from

Conversation

wusyong
Copy link
Member

@wusyong wusyong commented Dec 27, 2023

Blocked by #409

This PR adds two env variables for mozjs-sys build script. MOZJS_CREATE_MIRROR can create a spidermonkey tarball for release usage. While MOZJS_MIRROR can use this tarball to extract and link the static libraries without compiling spidermonkey and bindgen wrappers.

This also move libjsapi.a to the same place as jsapi.rs in $OUT_DIR/build
This commit adds two env variables for mozjs-sys build script.
MOZJS_CREATE_MIRROR can create a spidermonkey tarball for release
usage.
While MOZJS_MIRROR can use this tarball to download and link the
static libraries without compiling spidermonkey and bindgen wrappers.
@wusyong
Copy link
Member Author

wusyong commented Dec 27, 2023

This is the next step to push #439. This is still a draft because #409 hasn't been merged yet. And I haven't decided where to put the tarball yet either.
Right now it can already create the compressed file by setting MOZJS_CREATE_MIRROR=1, and then, reusing it by MOZJS_MIRROR=/path/to/tar.gz.
I'm not sure what github action should be used for releasing it. And I don't have the permission to release either. I'll probably try it with my local fork first to see how it works.

@sagudev
Copy link
Member

sagudev commented Dec 30, 2023

Why don't we just use uncompressed files instead of taring them, like rusty_v8 is doing?

@wusyong
Copy link
Member Author

wusyong commented Jan 1, 2024

Why don't we just use uncompressed files instead of taring them, like rusty_v8 is doing?

rusty_v8 only has one .a static binary AFAIK. They bind the functions manually so they don't have bindgen files.
Do you mean we just upload every single files and download them one by one?
I use tar crate just because it's the first option when I think about grouping the files and extracting them.

@wusyong
Copy link
Member Author

wusyong commented Jan 3, 2024

Please let me close this draft since my fork isn't actually forked from this repo which cause a bit inconvenience.
And I would like to test a little bit on my own CI pipeline.
I'll open another one pretty soon.

@wusyong wusyong closed this Jan 3, 2024
@delan delan mentioned this pull request Jan 18, 2024
39 tasks
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