You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some projects, I need to compile native libraries for different architecture/OS.
What is the recommended way to deal with those if I want to publish my (otherwise TypeScript) package into JSR?
Neither the docs about publishing a module nor the one for the deno.json could answer anything in this regard.
What I certainly want to avoid is to download anything from the "internet" at package load time.
So I would be fine with any of these options (ordered by preference) from a users perspective (someone adding my package as a dependency):
publish one package and "somehow" let the dependency mechanism work out which concrete files to download
publish architecture-specific packages (includes the native library in the selected version)
publish a package and the native libraries separately, but allow me to download the specific native library during dependency resolution time
At the end of the day, I have one application that wants to make use of this package and that is getting built into a Docker image with no write access to the container storage at runtime, so everything has to be in place at Docker image build time.
I know how to work around this at the moment, but it includes a lot of hacks and is a nightmare from a DX perspective.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In some projects, I need to compile native libraries for different architecture/OS.
What is the recommended way to deal with those if I want to publish my (otherwise TypeScript) package into JSR?
Neither the docs about publishing a module nor the one for the
deno.json
could answer anything in this regard.What I certainly want to avoid is to download anything from the "internet" at package load time.
So I would be fine with any of these options (ordered by preference) from a users perspective (someone adding my package as a dependency):
At the end of the day, I have one application that wants to make use of this package and that is getting built into a Docker image with no write access to the container storage at runtime, so everything has to be in place at Docker image build time.
I know how to work around this at the moment, but it includes a lot of hacks and is a nightmare from a DX perspective.
Any help is highly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions