yamlstar-plugin-parser-rapidyaml 0.1.4__py3-none-macosx_14_0_arm64.whl
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.
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/License +21 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/__init__.py +41 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/lib/libyamlstar-plugin-parser-rapidyaml.dylib +0 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/c4core.txt +19 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/debugbreak.txt +25 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/fast-float.txt +47 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/rapidyaml.txt +19 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/plugin.edn +6 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/METADATA +254 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/RECORD +13 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/WHEEL +5 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/entry_points.txt +2 -0
- yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2026 yaml.com
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/__init__.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright 2026 yaml.org
|
|
2
|
+
# MIT License
|
|
3
|
+
|
|
4
|
+
"""Installed library paths for the YAMLStar RapidYAML plugin."""
|
|
5
|
+
|
|
6
|
+
import os
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
import sys
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _library_filename():
|
|
12
|
+
if sys.platform == 'darwin':
|
|
13
|
+
extension = 'dylib'
|
|
14
|
+
elif sys.platform == 'linux' or sys.platform.startswith('freebsd'):
|
|
15
|
+
extension = 'so'
|
|
16
|
+
else:
|
|
17
|
+
raise RuntimeError(
|
|
18
|
+
"Unsupported platform '%s' for yamlstar-plugin-parser-rapidyaml" %
|
|
19
|
+
sys.platform)
|
|
20
|
+
return 'libyamlstar-plugin-parser-rapidyaml.%s' % extension
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def library_path():
|
|
24
|
+
"""Return the absolute path to the installed plugin library."""
|
|
25
|
+
path = Path(__file__).parent / 'lib' / _library_filename()
|
|
26
|
+
if not path.is_file():
|
|
27
|
+
raise RuntimeError('YAMLStar RapidYAML library not found: %s' % path)
|
|
28
|
+
return str(path.resolve())
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def library_dir():
|
|
32
|
+
"""Return the absolute directory containing the plugin library."""
|
|
33
|
+
return os.path.dirname(library_path())
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def manifest_path():
|
|
37
|
+
"""Return the absolute path to the installed plugin manifest."""
|
|
38
|
+
path = Path(__file__).parent / 'plugin.edn'
|
|
39
|
+
if not path.is_file():
|
|
40
|
+
raise RuntimeError('YAMLStar RapidYAML manifest not found: %s' % path)
|
|
41
|
+
return str(path.resolve())
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2018, Joao Paulo Magalhaes <dev@jpmag.me>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the "Software"),
|
|
5
|
+
to deal in the Software without restriction, including without limitation
|
|
6
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
7
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
8
|
+
Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included
|
|
11
|
+
in all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
14
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
19
|
+
DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Copyright (c) 2011-2021, Scott Tsai
|
|
2
|
+
*
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Redistribution and use in source and binary forms, with or without
|
|
6
|
+
* modification, are permitted provided that the following conditions are met:
|
|
7
|
+
*
|
|
8
|
+
* 1. Redistributions of source code must retain the above copyright notice,
|
|
9
|
+
* this list of conditions and the following disclaimer.
|
|
10
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
* and/or other materials provided with the distribution.
|
|
13
|
+
*
|
|
14
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
15
|
+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
16
|
+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
17
|
+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
18
|
+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
19
|
+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
20
|
+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
21
|
+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
22
|
+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
23
|
+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
24
|
+
* POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
+
*/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// fast_float by Daniel Lemire
|
|
2
|
+
// fast_float by João Paulo Magalhaes
|
|
3
|
+
//
|
|
4
|
+
//
|
|
5
|
+
// with contributions from Eugene Golushkov
|
|
6
|
+
// with contributions from Maksim Kita
|
|
7
|
+
// with contributions from Marcin Wojdyr
|
|
8
|
+
// with contributions from Neal Richardson
|
|
9
|
+
// with contributions from Tim Paine
|
|
10
|
+
// with contributions from Fabio Pellacini
|
|
11
|
+
// with contributions from Lénárd Szolnoki
|
|
12
|
+
// with contributions from Jan Pharago
|
|
13
|
+
// with contributions from Maya Warrier
|
|
14
|
+
// with contributions from Taha Khokhar
|
|
15
|
+
// with contributions from Anders Dalvander
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
// MIT License Notice
|
|
19
|
+
//
|
|
20
|
+
// MIT License
|
|
21
|
+
//
|
|
22
|
+
// Copyright (c) 2021 The fast_float authors
|
|
23
|
+
//
|
|
24
|
+
// Permission is hereby granted, free of charge, to any
|
|
25
|
+
// person obtaining a copy of this software and associated
|
|
26
|
+
// documentation files (the "Software"), to deal in the
|
|
27
|
+
// Software without restriction, including without
|
|
28
|
+
// limitation the rights to use, copy, modify, merge,
|
|
29
|
+
// publish, distribute, sublicense, and/or sell copies of
|
|
30
|
+
// the Software, and to permit persons to whom the Software
|
|
31
|
+
// is furnished to do so, subject to the following
|
|
32
|
+
// conditions:
|
|
33
|
+
//
|
|
34
|
+
// The above copyright notice and this permission notice
|
|
35
|
+
// shall be included in all copies or substantial portions
|
|
36
|
+
// of the Software.
|
|
37
|
+
//
|
|
38
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
|
39
|
+
// ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
|
40
|
+
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
41
|
+
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
|
42
|
+
// SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
43
|
+
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
44
|
+
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
|
45
|
+
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
46
|
+
// DEALINGS IN THE SOFTWARE.
|
|
47
|
+
//
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2018, Joao Paulo Magalhaes <dev@jpmag.me>
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the "Software"),
|
|
5
|
+
to deal in the Software without restriction, including without limitation
|
|
6
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
7
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
|
8
|
+
Software is furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included
|
|
11
|
+
in all copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
14
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
18
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
19
|
+
DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yamlstar-plugin-parser-rapidyaml
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: RapidYAML parser plugin for YAMLStar
|
|
5
|
+
Home-page: https://github.com/yamlstar/yamlstar-plugin-parser-rapidyaml
|
|
6
|
+
Author: Ingy döt Net
|
|
7
|
+
Author-email: ingy@ingy.net
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
14
|
+
Requires-Python: >=3.6, <4
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: license
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
# YAMLStar RapidYAML Parser
|
|
27
|
+
|
|
28
|
+
An optional RapidYAML parser for YAMLStar and go-yaml.
|
|
29
|
+
The shared library is implemented entirely in C++ and embeds no Go runtime.
|
|
30
|
+
The plugin implements ABI v2 transforms returning EDN parser events.
|
|
31
|
+
It contains no Glojure runtime.
|
|
32
|
+
The Go adapter uses purego to load its C ABI without cgo.
|
|
33
|
+
Versions through 0.1.2 embedded Go and could crash when loaded by Go hosts
|
|
34
|
+
on Intel macOS; use 0.1.3 or newer.
|
|
35
|
+
It requires a YAMLStar host with the `parser=rapidyaml` ABI v2 registration.
|
|
36
|
+
Release 0.1.0 used ABI v1 and cannot be loaded by the new host.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
yaml --plugin=parser=rapidyaml
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The implementation name is `rapidyaml` and the plugin API is `parser`.
|
|
43
|
+
The repository and Python distribution are `yamlstar-plugin-parser-rapidyaml`.
|
|
44
|
+
Libraries use `libyamlstar-plugin-parser-rapidyaml.so` on Linux and
|
|
45
|
+
`.dylib` on macOS.
|
|
46
|
+
The native parser accepts no parser-specific options.
|
|
47
|
+
The Go adapter also accepts the installation option described below.
|
|
48
|
+
|
|
49
|
+
## Build and test
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
make build
|
|
53
|
+
make test
|
|
54
|
+
make test-conformance
|
|
55
|
+
make fuzz
|
|
56
|
+
make benchmark
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Makes installs project tools into `.cache`.
|
|
60
|
+
Building the native library requires a C++11 compiler, using GCC on Linux
|
|
61
|
+
or Clang on macOS.
|
|
62
|
+
Go is needed for the adapter and test suite, including the cgo test oracle.
|
|
63
|
+
Run project-dependent commands with `make shell CMD='...'`.
|
|
64
|
+
The build pins rapidyaml v0.16.0 at
|
|
65
|
+
`f8ac8dd50f4f7916579d55a05ebf9c6488e52670`.
|
|
66
|
+
This checkout includes the c4core v0.6.0 source snapshot; it has no submodules.
|
|
67
|
+
The C++ wrapper converts RapidYAML integer events directly to ABI v2 EDN.
|
|
68
|
+
The previous Go/YEBP v1 conversion is retained as a differential test oracle.
|
|
69
|
+
Tests compare native event bytes and error classifications against that oracle
|
|
70
|
+
for the pinned YAML test suite without changing its expected results.
|
|
71
|
+
Adapter and archive tests reject libraries containing a Go runtime.
|
|
72
|
+
|
|
73
|
+
## go-yaml integration
|
|
74
|
+
|
|
75
|
+
The `goyaml` package exports `New(options ...Option)` and `Register() error`
|
|
76
|
+
for go-yaml.
|
|
77
|
+
The adapter loads this plugin's ABI v2 shared library at runtime and requires
|
|
78
|
+
no cgo in the consuming Go executable.
|
|
79
|
+
Linux, FreeBSD, and macOS hosts can load manually installed libraries.
|
|
80
|
+
Automatic installation supports the four Linux and macOS release platforms.
|
|
81
|
+
|
|
82
|
+
```go
|
|
83
|
+
import (
|
|
84
|
+
"github.com/yamlstar/yamlstar-plugin-parser-rapidyaml/goyaml"
|
|
85
|
+
"go.yaml.in/yaml/v4"
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
var value any
|
|
89
|
+
err := yaml.Load([]byte("answer: 42"), &value,
|
|
90
|
+
yaml.WithPlugin(goyaml.New()))
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Call `goyaml.Register()` during startup before parsing named configuration.
|
|
94
|
+
It registers `yaml-parser=rapidyaml` at `goyaml.Version`, preserving the native
|
|
95
|
+
Go parser as the default.
|
|
96
|
+
Registration and `--help` do not load or download a library.
|
|
97
|
+
The library is resolved on the first parse with RapidYAML.
|
|
98
|
+
The compiled-in `go-yaml` parser requires no parser shared library.
|
|
99
|
+
|
|
100
|
+
The adapter requires the native library version matching its release.
|
|
101
|
+
If missing, it downloads that exact release's archive and `SHA256SUMS` from
|
|
102
|
+
GitHub, verifies them, and installs the library atomically.
|
|
103
|
+
This requires no YAMLStar executable or external download/archive commands.
|
|
104
|
+
Existing incompatible libraries produce an error and are preserved.
|
|
105
|
+
Unknown configuration options, duplicate registration, and mismatched requested
|
|
106
|
+
versions also return errors.
|
|
107
|
+
|
|
108
|
+
Use `goyaml.New(goyaml.WithInstall(false))` to disable downloads in Go code.
|
|
109
|
+
For named configuration, use:
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
plugin:
|
|
113
|
+
yaml-parser:
|
|
114
|
+
name: rapidyaml
|
|
115
|
+
install: false
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`YAMLSTAR_LIBRARY_PATH` specifies library search directories.
|
|
119
|
+
When unset, the adapter searches beside the executable, its `../lib` directory,
|
|
120
|
+
`$HOME/.local/lib`, `/usr/local/lib`, and `/usr/lib`.
|
|
121
|
+
An explicitly configured path replaces those defaults, including an empty path.
|
|
122
|
+
Missing libraries are installed into the first writable search directory.
|
|
123
|
+
Select another directory with `YAMLSTAR_LIBRARY_PATH` when an incompatible
|
|
124
|
+
library already exists.
|
|
125
|
+
|
|
126
|
+
After publishing the native `0.1.3` release assets and Go module tag `v0.1.3`,
|
|
127
|
+
build a go-yaml CLI once:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
make cli \
|
|
131
|
+
PLUGIN-PACKAGE=github.com/yamlstar/yamlstar-plugin-parser-rapidyaml/goyaml@v0.1.3
|
|
132
|
+
./go-yaml --plugin=yaml-parser=rapidyaml -j < input.yaml
|
|
133
|
+
./go-yaml --plugin=yaml-parser=go-yaml -j < input.yaml
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
`PLUGIN-PACKAGE` links the adapter; runtime `--plugin` selects it.
|
|
137
|
+
The packages-only build retains native defaults.
|
|
138
|
+
To select RapidYAML as the build default, add `PLUGIN=yaml-parser=rapidyaml`.
|
|
139
|
+
No parser switch requires another build.
|
|
140
|
+
The Go module tag and native release tag refer to the same commit.
|
|
141
|
+
Archives retain unprefixed versions in their names and download URLs.
|
|
142
|
+
|
|
143
|
+
`make test-goyaml` tests the adapter with cgo disabled.
|
|
144
|
+
`make test-goyaml-race` runs its concurrency and installation tests with the
|
|
145
|
+
Go race detector.
|
|
146
|
+
Set `GO_YAML_CLI` to an adapter-enabled executable to run CLI regressions too.
|
|
147
|
+
Installer tests use local HTTP fixtures without contacting GitHub.
|
|
148
|
+
`make test-goyaml-cli` uses `GO_YAML_DIR` (default `../go-yaml`) to test the
|
|
149
|
+
actual generic `PLUGIN-PACKAGE` build with a local adapter snapshot.
|
|
150
|
+
It stages sources, a file module proxy, and its executable under
|
|
151
|
+
`.cache/integration`, leaving the supplied checkout and executable unchanged.
|
|
152
|
+
|
|
153
|
+
To try a local build from this directory:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
make build
|
|
157
|
+
YAMLSTAR_LIBRARY_PATH="$PWD/lib" yaml --plugin=parser=rapidyaml --no-install \
|
|
158
|
+
--eval 'a: [1, 2, 3]'
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
YAMLStar and go-yaml can share that same library directory.
|
|
162
|
+
For this coordinated workspace, build YAMLStar's CLI and shared host library
|
|
163
|
+
from the workspace root with `make cli build-libyamlstar`, then build go-yaml
|
|
164
|
+
with the wanted adapter packages once.
|
|
165
|
+
Until the adapters are published, stage local module snapshots under `.cache`
|
|
166
|
+
with an isolated file Go proxy and module cache, and supply their explicit
|
|
167
|
+
versions through `PLUGIN-PACKAGE`.
|
|
168
|
+
Keep local staging separate from public release commands.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
## Python
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
pip install yamlstar-plugin-parser-rapidyaml
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
import yamlstar
|
|
179
|
+
|
|
180
|
+
opts = yamlstar.Options().plugin(
|
|
181
|
+
yamlstar.parser('rapidyaml'))
|
|
182
|
+
ys = yamlstar.YAMLStar(opts)
|
|
183
|
+
assert ys.load('a: [1, 2, 3]') == {'a': [1, 2, 3]}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Wheels expose the `parser-rapidyaml` entry point in `yamlstar.plugins`.
|
|
187
|
+
They contain the ABI v2 shared library and manifest.
|
|
188
|
+
Other bindings select the same parser through their existing options mapping.
|
|
189
|
+
Integration tests exercise the Glojure CLI and Python binding.
|
|
190
|
+
|
|
191
|
+
## Conformance
|
|
192
|
+
|
|
193
|
+
`make test-conformance` compares binary events against 402 fixtures in the
|
|
194
|
+
YAML test suite at `6ad3d2c62885d82fc349026c136ef560838fdf3d`.
|
|
195
|
+
The baseline records nine upstream tab-separation differences: three valid
|
|
196
|
+
inputs rejected, three invalid inputs accepted, and three event mismatches.
|
|
197
|
+
See `test/expected-events.txt` for individual cases and explanations.
|
|
198
|
+
New differences and unexpected improvements fail the test for review.
|
|
199
|
+
The adapter does not fall back to another parser.
|
|
200
|
+
|
|
201
|
+
Tests cover scalar styles, tags, directives, explicit document markers,
|
|
202
|
+
anchors, aliases, buffer growth, malformed input, ownership, and concurrent
|
|
203
|
+
calls through the C ABI.
|
|
204
|
+
Input buffers are limited to less than 512 MiB by the integer-event adapter.
|
|
205
|
+
Output is owned by the plugin and released with `yamlstar_plugin_v2_free`.
|
|
206
|
+
Status 0 returns an EDN event vector.
|
|
207
|
+
Status 1 reports parse/configuration errors; status 2 reports ABI/internal errors.
|
|
208
|
+
Manifests use EDN; failures return plain UTF-8 error messages.
|
|
209
|
+
|
|
210
|
+
## Performance
|
|
211
|
+
|
|
212
|
+
The initial full CLI comparison is slower than built-in `go-yaml` on the
|
|
213
|
+
three measured fixtures.
|
|
214
|
+
See [Performance.md](Performance.md) for results and reproduction commands.
|
|
215
|
+
Those historical measurements used ABI v1 binary transport.
|
|
216
|
+
The current ABI v2 adapter converts the internal binary events to EDN.
|
|
217
|
+
Assertions are disabled in all builds; parse-error handling remains enabled.
|
|
218
|
+
|
|
219
|
+
## Release
|
|
220
|
+
|
|
221
|
+
See [Releasing.md](Releasing.md) for PyPI trusted-publisher setup and
|
|
222
|
+
recovery from a failed wheel publication.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
make dist
|
|
226
|
+
make wheel
|
|
227
|
+
make test-wheel
|
|
228
|
+
make release v=0.1.3 d=1
|
|
229
|
+
make release v=0.1.3
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Release archives use
|
|
233
|
+
`yamlstar-plugin-parser-rapidyaml-VERSION-PLATFORM.tar.xz`.
|
|
234
|
+
The release workflow builds Linux x64/aarch64 with a manylinux 2.28 baseline,
|
|
235
|
+
and macOS x64/arm64, validates archives and wheels, and publishes checksums.
|
|
236
|
+
The repository must exist under `yamlstar/yamlstar-plugin-parser-rapidyaml`.
|
|
237
|
+
Configure PyPI trusted publishing for distribution
|
|
238
|
+
`yamlstar-plugin-parser-rapidyaml`, workflow `release.yaml`, environment `pypi`.
|
|
239
|
+
Release from `main`, or pass `a=1` to release from another branch.
|
|
240
|
+
The release helper creates both `VERSION` and `vVERSION` tags at the same
|
|
241
|
+
commit, checks them for conflicts, and updates the adapter's version together
|
|
242
|
+
with the native manifest and build metadata.
|
|
243
|
+
GitHub assets remain attached to the bare native tag.
|
|
244
|
+
The Go tag makes `goyaml` importable at a tagged module version.
|
|
245
|
+
Retries preserve both tags; changes after tagging require a new version.
|
|
246
|
+
Publish the matching native assets before advertising the adapter release.
|
|
247
|
+
No release or publication happens during normal builds or tests.
|
|
248
|
+
|
|
249
|
+
The integration workflow uses the YAMLStar branch selected by the repository
|
|
250
|
+
variable `YAMLSTAR_REF`, defaulting to a pinned main revision with ABI v2
|
|
251
|
+
RapidYAML support.
|
|
252
|
+
The go-yaml CLI integration uses a pinned host with the canonical parser API.
|
|
253
|
+
|
|
254
|
+
Third-party notices are included in `licenses/` and release artifacts.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/License,sha256=ioHA66lwfnphytMN71eU0oy8LyHdsq8hL_zof0aRTQA,1070
|
|
2
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/__init__.py,sha256=aNf-iCJLvCVsQeDSRB3zGRiDVaNFyekyq17J6juBeaU,1186
|
|
3
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/plugin.edn,sha256=jP5KA25DT7eXk2pCtsPVDg_5Ja70B2gh2m9MuS3mAuA,123
|
|
4
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/lib/libyamlstar-plugin-parser-rapidyaml.dylib,sha256=lj735YriFCPkcA4NBod7l8xSjmesfexIdfhUD9KtpHM,273272
|
|
5
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/c4core.txt,sha256=lFahvvp8BhL6Q7EsGHFDXO-kWSsQeP5pXFhf-r9MdFI,1080
|
|
6
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/debugbreak.txt,sha256=FEfWy3mTLTbzp6Qt_CjoYdbeNk-E3Wf_NRT5ZAYJ46A,1375
|
|
7
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/fast-float.txt,sha256=eDm0TpY-mobQUE0Hxl0gBWJ16C2SJDkjmUqaTFGItM4,1790
|
|
8
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.data/purelib/yamlstar_plugin_parser_rapidyaml/licenses/rapidyaml.txt,sha256=lFahvvp8BhL6Q7EsGHFDXO-kWSsQeP5pXFhf-r9MdFI,1080
|
|
9
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/METADATA,sha256=pgo975UHSlGMywMc84sRG2HlQeHrAKjSevXc88a6pI4,10153
|
|
10
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/WHEEL,sha256=FhEgcH91d6QFK-RbYU7zbRbSEPxYLL8iqNY8lJNbOc4,106
|
|
11
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/entry_points.txt,sha256=eeTu1Rfd2_ZpBNN0egQiQitZuzwmxZLo4B-_vqRHM1Q,83
|
|
12
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/top_level.txt,sha256=yu1apzJuzZTGtlRe0TE5NPmK97KJF2SmuAIynOWoOzM,33
|
|
13
|
+
yamlstar_plugin_parser_rapidyaml-0.1.4.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
yamlstar_plugin_parser_rapidyaml
|