-
Notifications
You must be signed in to change notification settings - Fork 334
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
Add support for importing packages from the registry and http/https served files #1049
Merged
orlarey
merged 23 commits into
grame-cncm:master-dev-pacman
from
shehab299:pkg-installer
Aug 16, 2024
Merged
Add support for importing packages from the registry and http/https served files #1049
orlarey
merged 23 commits into
grame-cncm:master-dev-pacman
from
shehab299:pkg-installer
Aug 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sletz
pushed a commit
that referenced
this pull request
Jan 7, 2025
…erved files (#1049) * Added package manager module * Fixing Error Messages and Error handling * Added --package-only and --pkg-list options in the compiler * Changed Example to use the new package format * Changed help to contain the new options * Added a url handling library and changed the way i handle the registry url * Added WASM compatiable code * Batch to fix stackoverflow error in browsers * add node support for xhr requests * Update Downloader.cpp * change xhr requests to fetch * testing * x * xmlrequest support * remove async debug * Fix the versions in examples and add a test script * update libraries * add author in error messages * Solve the problem with XMLHttpRequest isn't a constructor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The package installer is a module embedded in the Faust compiler that interacts with the registry to download packages.
Dependency: libcurl
The package installer relies on libcurl for handling networking tasks such as downloading packages. To ensure the package installer functions correctly, make sure libcurl is installed on your system.
To install libcurl, you can follow the tutorial available here. This guide provides detailed instructions for various operating systems, including Linux, Windows, and macOS.
Downloading Packages
When you import a package using the
pkgUrl
syntax, the package installer automatically downloads the specified package from the registry.Example
In this example, the Faust compiler will:
pkgUrl
is parsed to identify the user, library, and version.If the package is already cached, the installer will use the cached version instead of downloading it again, unless a different version is specified.
Caching Packages
When you import a package using
pkgUrl
, Faust caches these packages in a local registry on your device.Local Registry Path
The path to the local registry is configurable via the environment variable:
FAUST_REGISTRY_PATH
: Defines the location of the local registry.Default Paths
By default,
FAUST_REGISTRY_PATH
is set to:Linux:
Windows:
macOS:
Default Registry URL
By default, the package installer deals with the official Faust Registry, which is hosted on GitHub:
FAUST_REGISTRY_URL
: An environment variable that defines the URL of the registry.https://github.com/shehab299/Registry.git
Default Branch
The package installer uses the default branch of the registry repository for fetching packages:
FAUST_REGISTRY_BRANCH
: An environment variable that defines the branch of the registry to use.main
Custom Registry Configuration
If you want to create replicas of the registry in your organization or use a different branch, you can configure these using the environment variables
FAUST_REGISTRY_URL
andFAUST_REGISTRY_BRANCH
.Testing
A Python script has been added to the faust repo to automate testing. This script runs all DSP files in the examples folder and indicates whether each test passed or failed.