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

enable cross-platform testing for NAPI native modules #410

Closed
OmarTawfik opened this issue Apr 14, 2023 · 0 comments · Fixed by #1120
Closed

enable cross-platform testing for NAPI native modules #410

OmarTawfik opened this issue Apr 14, 2023 · 0 comments · Fixed by #1120
Assignees

Comments

@OmarTawfik
Copy link
Contributor

Right now, we only test the architecture of the dev container (linux).

@OmarTawfik OmarTawfik added this to the 2️⃣ Beta Preview milestone Apr 14, 2023
OmarTawfik added a commit that referenced this issue Apr 15, 2023
## In this PR

- add support for publishing npm packages for slang.
- add ability to cross-build native NAPI modules for 9 targets.
- replace Hermit's `rust` package with `rustup` to allow installing
multiple targets.
- now CI will check to make sure TypeScript sources are up to date and
pass tests on every push.
- fill NPM packages metadata, including platform-specific ones.
- removed yarn since it is no longer needed. standardizing on npm
everywhere.
- following publishing, moved directory structure to
`solidity/outputs/cargo` and `solidity/outputs/npm`, and within each,
three sub-folders: `build`, `crate`, and `tests`. That separation makes
sure our internal codegen crates are not propagated to product crates.

## Changes to dev scripts

So far we have relied on cargo workspace commands
(`scripts/cargo/check.sh` and `scripts/cargo/test.sh`). Each crate uses
its own `build.rs` to define specific build steps that need to happen.

With this PR, adding NPM publishing, we do the same with the root
`package.json`. Each package will define custom tasks in its own
`package.json`, and we will run all of them through
`scripts/npm/build.sh` and `scripts/npm/test.sh`.

For example, the NAPI packages in `crates/solidity/outputs/npm` will
call NAPI specific scripts defined in `scripts/npm/napi` to
build/test/publish.

## Limitations

- Actual publishing is still disabled in CI. Once we figure out final
package names, will update the source and re-enable it.
- #410 as NPM testing is only local for now (linux on devcontainer).
@OmarTawfik OmarTawfik self-assigned this May 3, 2023
@OmarTawfik OmarTawfik changed the title enable cross-testing for NAPI native modules enable cross-platform testing for NAPI native modules Jun 12, 2023
@OmarTawfik OmarTawfik removed their assignment Jun 12, 2023
@OmarTawfik OmarTawfik removed this from the 2️⃣ Beta Preview milestone Jul 11, 2023
@OmarTawfik OmarTawfik moved this to Todo in Slang - Backlog Jul 26, 2024
@OmarTawfik OmarTawfik self-assigned this Oct 8, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 8, 2024
See the added changesets for the specific API changes/additions.

Additionally, this PR:

- deprecates/removes NAPI build/pipeline.
- adds `jco` as a sub-module to the repo.
- deletes the platform-specific packages, as we now just need one.

Closes #410
Closes #570
Closes #573
Closes #816
Closes #987
@github-project-automation github-project-automation bot moved this from Todo to Done in Slang - Backlog Oct 8, 2024
@OmarTawfik OmarTawfik moved this from ⏳ Todo to ✅ Done in Slang - 2024 H2 Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant