@webpodjs/tool-ripgrep 0.0.0-stage → 16.0.0-wp.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,16 @@
1
- # Temporary Holding Version
1
+ # @webpodjs/tool-ripgrep
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ripgrep 16.0.0, a line-oriented search tool that recursively searches directories for a regex pattern: built for wasm32-wasip1 from its upstream source, for webpod's host mode (and any WASI preview 1 runtime). Upstream: https://github.com/BurntSushi/ripgrep.
4
+
5
+ Commands: `rg`.
6
+
7
+ How it differs from upstream's own builds (WASI preview 1 has no processes, signals or sockets):
8
+
9
+ - Built as upstream's release binaries are (cargo's release-lto profile, the pcre2 feature), but PCRE2 has no JIT on wasm: `-P` patterns run in its interpreter.
10
+ - With no path given, stdin is searched when it is a pipe, a file or a socket, as on Unix: on WASI that is the file type the runner reports for it (a pipe is a stream socket to uvwasi and webpod, "unknown" to wasmtime). Upstream's WASI build never searches it (`wasi-stdin.patch`).
11
+ - Following symbolic links (`-L`) checks for loops by device and inode, as on Unix: the same-file crate has no WASI implementation upstream (`same-file-wasi.patch`, from WASI's filestat).
12
+ - No `--pre` preprocessors and no `-z`/`--search-zip` (both run other programs), no `--one-file-system` (WASI has no device numbers to compare across mounts). Errors give WASI's error numbers ("os error 44" for ENOENT).
13
+
14
+ License: (Unlicense OR MIT) AND BSD-3-Clause WITH PCRE2-exception (the texts are in `licenses/`). How it was built: SOURCES.md. The `webpod` field of
15
+ package.json is the manifest webpod's runner reads. Versions are `<upstream version>-wp.<n>`: n counts this recipe's
16
+ builds of that version.
package/SOURCES.md ADDED
@@ -0,0 +1,12 @@
1
+ # Sources of @webpodjs/tool-ripgrep@16.0.0-wp.1
2
+
3
+ - ripgrep 16.0.0: https://github.com/BurntSushi/ripgrep, tag `16.0.0` (commit 669cb4c755db20b26c3af3d923c042ae224c7496).
4
+ - PCRE2 10.45 (BSD-3-Clause WITH PCRE2-exception): the pcre2-sys 0.2.10 crate (crates.io; its checksum is in ripgrep's Cargo.lock).
5
+ - The recipe: https://github.com/mirrorange/webpod/tree/4b3ed092cda67f49ec29702b6f01535990405f11/scripts/tools/ripgrep (`build.sh`, the patches `same-file-wasi.patch`, `wasi-stdin.patch`), with webpod's
6
+ `scripts/tools/common/` (`crt-cwd.c`: the working directory from `PWD`).
7
+ Rebuild: `scripts/tools/build.sh ripgrep <out>` in webpod at commit 4b3ed092cda67f49ec29702b6f01535990405f11.
8
+ - Toolchain: wasi-sdk 34.0 (github.com/WebAssembly/wasi-sdk, the release's linux tarball, sha256 in `common/toolchain.sh`), Rust 1.100.1 (rustup) for wasm32-wasip1.
9
+ - `bin/rg.wasm`: 3603721 bytes, sha256 757af7abb2310892f3d8e1722d0b60a3c2946a658f09e4c382cd299946064907.
10
+ - The source: https://github.com/mirrorange/webpod-tool-sources/tree/main/ripgrep/16.0.0-wp.1: what the recipe
11
+ fetched (the upstream sources above, as fetched; a git tag as its git archive), the recipe with its patches and
12
+ webpod's `scripts/tools/common/`, and this file (the build's `webpodjs-tool-ripgrep-16.0.0-wp.1-source.tar`).
package/bin/rg.wasm ADDED
Binary file
@@ -0,0 +1,3 @@
1
+ This project is dual-licensed under the Unlicense and MIT licenses.
2
+
3
+ You may use this code under the terms of either license.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Andrew Gallant
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,39 @@
1
+ /*************************************************
2
+ * Perl-Compatible Regular Expressions *
3
+ *************************************************/
4
+
5
+ /* PCRE is a library of functions to support regular expressions whose syntax
6
+ and semantics are as close as possible to those of the Perl 5 language.
7
+
8
+ Written by Philip Hazel
9
+ Original API code Copyright (c) 1997-2012 University of Cambridge
10
+ New API code Copyright (c) 2016-2024 University of Cambridge
11
+
12
+ -----------------------------------------------------------------------------
13
+ Redistribution and use in source and binary forms, with or without
14
+ modification, are permitted provided that the following conditions are met:
15
+
16
+ * Redistributions of source code must retain the above copyright notice,
17
+ this list of conditions and the following disclaimer.
18
+
19
+ * Redistributions in binary form must reproduce the above copyright
20
+ notice, this list of conditions and the following disclaimer in the
21
+ documentation and/or other materials provided with the distribution.
22
+
23
+ * Neither the name of the University of Cambridge nor the names of its
24
+ contributors may be used to endorse or promote products derived from
25
+ this software without specific prior written permission.
26
+
27
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
+ POSSIBILITY OF SUCH DAMAGE.
38
+ -----------------------------------------------------------------------------
39
+ */