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

Experiment: publish crate to NPM using wasm-pack #73

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yvan-sraka
Copy link

Summary & Motivation

The main motivation is to be able to use this crate in any JS/TS project, and to package and publish it on NPM. You can find the build artifacts generated into ./pkg folder here!

Backwards-incompatible changes

⚠️ For the need of wasm-pack wanted target wasm32-unknow-unkwnon, I quickly change the flake.nix configuration, this shouldn't be merged as is.

Further context

We try to build with @RaitoBezarius some experimental GUI frontend for Nix, using Svelte in a first PoC.

@yvan-sraka yvan-sraka marked this pull request as draft January 27, 2022 14:15
@Ma27
Copy link
Member

Ma27 commented Jun 26, 2022

Please note that I'm not necessarily inclined to maintain such a platform as well. However, if you're still willing to work on this (and help out with maintenance), then I'd be OK with merging it in and advertise the support as "experimental". Please rebase your branch in that case.

@Ma27 Ma27 added the enhancement New feature or request label Jul 1, 2022
@Ma27 Ma27 added this to the 1.0.0 milestone Jul 1, 2022
@fogti
Copy link
Contributor

fogti commented Jul 1, 2022

I'm also not sure if/how this is beneficial (I've wrote nix2js stuff), and I have no idea how this should/could be used by downstream JS or WASM code. I think most stuff that actually wants to use it would currently use an approach like the one used in nix2js (the transpile function is exposed as an API from a wasm-packed rust module, which internally uses rnix-parser); exposing the rnix parser type hierarchy and functions in a way which is actually usable and performant enough sounds hard and cumbersome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants