@codua/codeoutline-win32-x64 0.1.0
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/DISTRIBUTION.md +98 -0
- package/LICENSE +24 -0
- package/README.md +132 -0
- package/README.zh-CN.md +132 -0
- package/THIRD_PARTY.md +32 -0
- package/build-info.json +1 -0
- package/codeoutline +4 -0
- package/codeoutline.cmd +3 -0
- package/licenses/libdeflate.txt +22 -0
- package/licenses/lua-cmsgpack.txt +22 -0
- package/licenses/luajit.txt +56 -0
- package/licenses/mbedtls.txt +553 -0
- package/licenses/rpmalloc.txt +12 -0
- package/licenses/xnet2lua.txt +24 -0
- package/licenses/yyjson.txt +21 -0
- package/package.json +1 -0
- package/scripts/codeoutline/cli.lua +32 -0
- package/scripts/codeoutline/command.lua +155 -0
- package/scripts/codeoutline/common.lua +124 -0
- package/scripts/codeoutline/control.lua +4 -0
- package/scripts/codeoutline/explore.lua +500 -0
- package/scripts/codeoutline/graph.lua +380 -0
- package/scripts/codeoutline/http.lua +156 -0
- package/scripts/codeoutline/index.lua +404 -0
- package/scripts/codeoutline/index_worker.lua +43 -0
- package/scripts/codeoutline/lang/c.lua +362 -0
- package/scripts/codeoutline/lang/cpp.lua +539 -0
- package/scripts/codeoutline/lang/csharp.lua +334 -0
- package/scripts/codeoutline/lang/go.lua +233 -0
- package/scripts/codeoutline/lang/java.lua +274 -0
- package/scripts/codeoutline/lang/js.lua +466 -0
- package/scripts/codeoutline/lang/lua.lua +218 -0
- package/scripts/codeoutline/lang/python.lua +184 -0
- package/scripts/codeoutline/lang/rust.lua +276 -0
- package/scripts/codeoutline/main.lua +104 -0
- package/scripts/codeoutline/mcp.lua +188 -0
- package/scripts/codeoutline/parse.lua +49 -0
- package/scripts/codeoutline/path.lua +36 -0
- package/scripts/codeoutline/service.lua +135 -0
- package/scripts/codeoutline/text.lua +43 -0
- package/scripts/codeoutline/version.lua +1 -0
- package/scripts/codeoutline/xscan.lua +625 -0
- package/xnet2lua/bin/xnet.exe +0 -0
- package/xnet2lua/scripts/core/share/xhttp_codec.lua +835 -0
package/DISTRIBUTION.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Build and installation previews
|
|
2
|
+
|
|
3
|
+
The runtime and all command behavior are Lua/native. The npm launcher only finds
|
|
4
|
+
the matching platform package, starts the runtime, and forwards signals and status.
|
|
5
|
+
The native archive does not require Node, npm, Lua, a compiler, or Git at runtime.
|
|
6
|
+
|
|
7
|
+
## Stage a Windows preview
|
|
8
|
+
|
|
9
|
+
From the repository root, build the Windows runtime with a static CRT (copied to
|
|
10
|
+
`bin/`), then stage:
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
.\tools\build-runtime.ps1
|
|
14
|
+
.\bin\xnet.exe tools/package.lua TARGET=win32-x64 OUTPUT=dist/win32-x64 LOG_STDERR=1
|
|
15
|
+
npm pack ./dist/win32-x64/native --pack-destination ./dist
|
|
16
|
+
npm pack ./dist/win32-x64/npm --pack-destination ./dist
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Choose a fresh output directory for each build to avoid stale files. Each native
|
|
20
|
+
package contains `build-info.json` with source commits and SHA-256 file hashes.
|
|
21
|
+
The root development package stays private; only generated packages are staged.
|
|
22
|
+
`PLAN.md`, `AGENTS.md`, tests, caches, and development dependencies are excluded.
|
|
23
|
+
|
|
24
|
+
Install both generated tarballs in a fresh directory (use absolute paths):
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
npm init -y
|
|
28
|
+
npm install --offline --ignore-scripts C:/build/codeoutline-0.1.0.tgz C:/build/codua-codeoutline-win32-x64-0.1.0.tgz
|
|
29
|
+
.\node_modules\.bin\codeoutline.cmd doctor --project C:/src/project
|
|
30
|
+
.\node_modules\.bin\codeoutline.cmd serve --stdio --project C:/src/project
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`pnpm add --offline --ignore-scripts <entry-tarball> <platform-tarball>` uses the
|
|
34
|
+
same package layout. Once packages are published, optional dependencies select
|
|
35
|
+
the matching binary; keep them enabled. The launcher reports missing or mismatched
|
|
36
|
+
packages explicitly. Neither installation path uses postinstall downloads.
|
|
37
|
+
|
|
38
|
+
For native use, extract the `native/` directory and run `codeoutline.cmd` on
|
|
39
|
+
Windows, or `./codeoutline` on Unix. On Unix, mark `codeoutline` and
|
|
40
|
+
`xnet2lua/bin/xnet` executable before packing or archiving.
|
|
41
|
+
|
|
42
|
+
## Platform validation and publication
|
|
43
|
+
|
|
44
|
+
Targets are Windows x64, Linux x64 (glibc 2.28+), and macOS universal
|
|
45
|
+
(`darwin-universal`: Apple Silicon and Intel, macOS 11+). Only a platform with
|
|
46
|
+
a successful native build and installed-package smoke test is validated.
|
|
47
|
+
|
|
48
|
+
On macOS, `tools/build-runtime.sh` builds an arm64 and an x86_64 slice with
|
|
49
|
+
`MACOSX_DEPLOYMENT_TARGET=11.0` and merges them with `lipo`; clang would
|
|
50
|
+
otherwise require the build machine's own macOS version. CI checks both slices
|
|
51
|
+
and their minimum version, and runs the specs natively and under Rosetta.
|
|
52
|
+
`XNET_MAC_ARCHS=arm64` builds a single slice for local work. CI builds the Linux runtime in the `manylinux_2_28` container
|
|
53
|
+
(AlmaLinux 8) and fails if the binary needs a newer glibc symbol, so one package
|
|
54
|
+
covers RHEL/Rocky/Alma 8 and 9, CentOS Stream 9, Debian 10+, and Ubuntu 20.04+;
|
|
55
|
+
the specs also run inside AlmaLinux 8 and CentOS Stream 9. The npm launcher
|
|
56
|
+
rejects older glibc with a clear message. A Linux runtime built locally with
|
|
57
|
+
`tools/build-runtime.sh` targets the build host's glibc instead. Alpine/musl
|
|
58
|
+
and other architectures are unsupported.
|
|
59
|
+
|
|
60
|
+
GBK source decoding on Linux uses glibc's iconv module, which minimal EL8/EL9
|
|
61
|
+
installs and container images omit (`dnf install glibc-gconv-extra`). Without it
|
|
62
|
+
UTF-8 projects work normally, `doctor` reports the `gbk` check as unavailable, and
|
|
63
|
+
a query touching a GBK file fails with that installation hint. CI runs the specs
|
|
64
|
+
on AlmaLinux 8 as shipped (GBK cases must skip) and on CentOS Stream 9 with
|
|
65
|
+
`glibc-gconv-extra` (GBK cases must run).
|
|
66
|
+
|
|
67
|
+
The Windows runtime is x64, links the C runtime statically, and loads only
|
|
68
|
+
system DLLs (`kernel32`, `advapi32`, `ws2_32`, `bcrypt`), so no Visual C++
|
|
69
|
+
redistributable is needed. Its newest Windows API is
|
|
70
|
+
`GetSystemTimePreciseAsFileTime`, which makes Windows 8 / Server 2012 the floor
|
|
71
|
+
for the native archive; the npm route follows Node's own support (Node 20+,
|
|
72
|
+
effectively Windows 10 / Server 2016 or newer). Windows 11 on ARM64 installs
|
|
73
|
+
and runs the x64 package under emulation; Windows 10 on ARM cannot emulate x64.
|
|
74
|
+
The binary is not code-signed, so a downloaded archive may trigger SmartScreen
|
|
75
|
+
or be blocked by application allow-listing.
|
|
76
|
+
|
|
77
|
+
Staged packages keep `private: true`, which blocks `npm publish`, unless the
|
|
78
|
+
packaging tool runs with `RELEASE=1`. A release build refuses to run from a
|
|
79
|
+
checkout with tracked changes, from a pre-release version such as `-dev`, or
|
|
80
|
+
when `TAG` does not equal `v<version>`. CI stages release packages only for tag
|
|
81
|
+
pushes (`RELEASE=1 TAG=<tag>`), so pushing `v0.1.0` from a commit whose
|
|
82
|
+
`scripts/codeoutline/version.lua` says `0.1.0` yields the publishable artifacts;
|
|
83
|
+
branch pushes keep producing private previews. Publish the platform packages
|
|
84
|
+
first, then the entry package at the identical version.
|
|
85
|
+
|
|
86
|
+
Platform packages are published under the `@codua` scope
|
|
87
|
+
(`@codua/codeoutline-win32-x64`, `-linux-x64`, `-darwin-universal`; `npm pack`
|
|
88
|
+
names their tarballs `codua-codeoutline-<target>-<version>.tgz`). npm's spam
|
|
89
|
+
filter rejects new unscoped `<name>-<platform>` names, and a scope keeps
|
|
90
|
+
look-alike packages out. Users still install the unscoped entry package
|
|
91
|
+
`codeoutline`. Every package declares `publishConfig.access = public`.
|
|
92
|
+
|
|
93
|
+
The workflow in `.github/workflows/ci.yml` builds and tests all three targets and
|
|
94
|
+
uploads preview tarballs, native archives, and SHA-256 checksums. Adding the
|
|
95
|
+
workflow does not mean its remote runs have passed. Windows npm launchers forward
|
|
96
|
+
console signals; forcefully killing the Node process alone cannot forward a
|
|
97
|
+
signal. For supervised HTTP services on Windows, use the native launcher or stop
|
|
98
|
+
the process tree. Closing MCP stdin causes the native stdio service to exit.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, CodeOutline contributors
|
|
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, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
16
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
17
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
19
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
20
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
21
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
22
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
23
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
package/README.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# CodeOutline
|
|
2
|
+
|
|
3
|
+
English | [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
Lightweight code indexing and exploration for coding agents, as an MCP server. Powered by Lua.
|
|
6
|
+
|
|
7
|
+
CodeOutline answers symbol queries with line-numbered source, call paths, and callers/callees, refreshes incrementally, and caches the index on disk. The MCP protocol and both transports (stdio and Streamable HTTP) are implemented in Lua, so the service does not depend on Node; in the npm package, Node only locates and starts the runtime for your platform.
|
|
8
|
+
|
|
9
|
+
## Installation and setup
|
|
10
|
+
|
|
11
|
+
Requires Node.js 20 or newer. npm downloads the runtime for your platform automatically; no compiler or Lua installation is needed.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx -y codeoutline --version
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Claude Code** (added globally, available in every project):
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
claude mcp add codeoutline --scope user -- npx -y codeoutline serve --stdio
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Cursor** (`~/.cursor/mcp.json`):
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "mcpServers": { "codeoutline": { "command": "npx", "args": ["-y", "codeoutline", "serve", "--stdio"] } } }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
When no project is specified, the service uses, in order: the `projectPath` argument of the call, the `--project` option, the client's roots (the first directory returned by `roots/list`), and the directory the service was started in. Clients usually start the service in the project directory, so a global configuration needs no project path. Access defaults to `--project` or the start directory; repeat `--allow-root` to allow more.
|
|
30
|
+
|
|
31
|
+
Three tools are provided:
|
|
32
|
+
|
|
33
|
+
| Tool | Purpose |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `codeoutline_explore` | Query source, call paths, and callers/callees by symbol or file name (`query`; optional `projectPath`, `budget`) |
|
|
36
|
+
| `codeoutline_status` | Refresh and report index, cache, scanner, and parser statistics |
|
|
37
|
+
| `codeoutline_rebuild` | Rebuild fully, bypassing the cache |
|
|
38
|
+
|
|
39
|
+
Without Node, download the native archive for your platform from [GitHub Releases](https://github.com/1dao/codeoutline/releases), extract it, and run `codeoutline` (`codeoutline.cmd` on Windows).
|
|
40
|
+
|
|
41
|
+
## System requirements
|
|
42
|
+
|
|
43
|
+
| Platform | Requirements |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Windows | x64, Windows 10 / Server 2016 or newer (Windows 8 for the native archive); Windows 11 on ARM64 runs it under x64 emulation. No Visual C++ redistributable needed |
|
|
46
|
+
| Linux | x64, glibc 2.28 or newer: RHEL / Rocky / Alma 8 and 9, CentOS Stream 9, Debian 10+, Ubuntu 20.04+. Alpine/musl is not supported |
|
|
47
|
+
| macOS | macOS 11 or newer; one universal binary for Apple Silicon and Intel |
|
|
48
|
+
|
|
49
|
+
On Linux, decoding GBK sources needs the GBK module of the system iconv. Minimal EL8/EL9 installs and container images lack it: `dnf install glibc-gconv-extra`. UTF-8 projects work without it, and `codeoutline doctor` reports when it is missing.
|
|
50
|
+
|
|
51
|
+
## Supported languages
|
|
52
|
+
|
|
53
|
+
C, C++, C#, Go, Java, JavaScript / TypeScript (including JSX/TSX), Lua, Python, and Rust.
|
|
54
|
+
|
|
55
|
+
## Command line
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
codeoutline serve --stdio [--project PATH] [--allow-root PATH ...]
|
|
59
|
+
codeoutline serve --http [--host HOST] [--port PORT] [--project PATH]
|
|
60
|
+
codeoutline explore --project PATH --query QUERY [--budget BYTES]
|
|
61
|
+
codeoutline status [--project PATH]
|
|
62
|
+
codeoutline rebuild [--project PATH]
|
|
63
|
+
codeoutline doctor [--project PATH]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`status`, `rebuild`, and `doctor` print JSON; a failed diagnostic exits nonzero. One-shot commands default to the current directory as the project.
|
|
67
|
+
|
|
68
|
+
## MCP service details
|
|
69
|
+
|
|
70
|
+
The protocol baseline is [MCP 2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports). Query budgets range from 256 to 262144 bytes (default 16000); truncated output stays valid UTF-8 and ends with a truncation notice. Paths always refer to the machine running the service.
|
|
71
|
+
|
|
72
|
+
In stdio mode, stdout carries only MCP messages and logs go to stderr. HTTP listens on the local machine by default; clients connect to `http://127.0.0.1:19876/mcp`. Remote listening requires a `CODEOUTLINE_TOKEN` of at least 16 bytes and hosts allowed explicitly with `--allow-host`; clients send `Authorization: Bearer ...`. Repeat `--allow-origin` to allow full browser origins; unlisted origins are rejected. Protect the token with a TLS reverse proxy for remote deployments.
|
|
73
|
+
|
|
74
|
+
The main thread handles the protocol while a resident index thread serves queries one at a time. Requests with a progress token receive progress every second (over SSE for HTTP); there is no standalone GET/SSE endpoint (it returns 405). Limits: 64 sessions, 64 queued or running jobs, a 120-second job deadline, and sessions expire after 15 idle minutes. Cancellation takes effect at per-file checkpoints, so a single file's parse cannot be interrupted (files are capped at 1.5 MB); after a cancellation the possibly incomplete in-memory index is discarded and the next query recovers from the cache.
|
|
75
|
+
|
|
76
|
+
## Indexing behavior and limits
|
|
77
|
+
|
|
78
|
+
The cache lives at `.codeoutline/cache/<SHA-256 of path>.idx` in the user's home directory. It is integrity-checked and rebuilt automatically if corrupt; every write goes to a separate temporary file that atomically replaces the old one, which survives a failed write. Up to 8 projects stay resident by default, and idle ones are evicted after 15 minutes. Directory aliases and links resolve to real absolute paths; on Windows, ASCII case is ignored.
|
|
79
|
+
|
|
80
|
+
Source encodings are confirmed on demand: the first index pass does not check each file, only the files a query touches. UTF-8 (with or without BOM) is tried first, then strict GBK conversion; a GBK file is reparsed and the call graph rebuilt before the query runs, without modifying the file. Encoding results are cached and invalidated when a file changes, and a matched file that cannot be decoded is reported as an error. When both encodings are valid, UTF-8 wins. GBK files that no query has touched yet may still be misparsed, so Chinese identifiers can be missed; querying the file name triggers its repair.
|
|
81
|
+
|
|
82
|
+
Files are listed with ripgrep (`rg`) when available, honoring every `.gitignore`. Without `rg`, a directory walk supports only the common rules of the root `.gitignore` (no negation, no nested ignore files) and skips hidden directories, `node_modules`, `__pycache__`, and symbolic links. Project root paths must not contain `"`, `%`, `!`, `$`, backticks, backslashes, or line breaks.
|
|
83
|
+
|
|
84
|
+
## Building from source
|
|
85
|
+
|
|
86
|
+
The runtime comes from the [xnet2lua](https://github.com/1dao/xnet2lua) submodule:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
git submodule update --init --recursive
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The build scripts compile the LuaJIT runtime (with xproc, MPSCQ, and HTTPS) and copy it to `bin/` at the repository root. On Windows, run from an MSVC developer terminal; the result links the C runtime statically. On macOS, the result is a universal binary for macOS 11 or newer.
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
.\tools\build-runtime.ps1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
sh tools/build-runtime.sh
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
When running from source, pass `LOG_STDERR=1` explicitly; the installed `codeoutline` adds it for you:
|
|
103
|
+
|
|
104
|
+
```powershell
|
|
105
|
+
.\bin\xnet.exe scripts/codeoutline/command.lua LOG_STDERR=1 serve --stdio --project C:/src/project
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Tests:
|
|
109
|
+
|
|
110
|
+
```powershell
|
|
111
|
+
.\bin\xnet.exe tests/lua/codeoutline_spec.lua
|
|
112
|
+
.\bin\xnet.exe tests/lua/stability_spec.lua
|
|
113
|
+
npm ci
|
|
114
|
+
npm test
|
|
115
|
+
npm run test:package
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`npm test` checks both transports with the official MCP SDK; `npm run test:package` builds real packages and verifies an installation outside the checkout. Set `XSCAN_PURE_LUA=1` to exercise the pure-Lua scanner. Packaging and publishing are described in [DISTRIBUTION.md](docs/DISTRIBUTION.md).
|
|
119
|
+
|
|
120
|
+
## Embedding
|
|
121
|
+
|
|
122
|
+
```lua
|
|
123
|
+
package.path = 'scripts/?.lua;' .. package.path
|
|
124
|
+
local service = require('codeoutline.service')
|
|
125
|
+
local text, info = service.explore('C:/src/project', 'Session.save', { budget = 16000 })
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`get`, `explore`, and `status` refresh automatically; `forget` clears only the in-memory index, and `rebuild` reindexes without the disk cache. `service.configure` adjusts the resident project count and idle timeout. When embedding on Android, the host must call `xutils_android_init(JavaVM*)` once before starting worker threads; otherwise GBK conversion reports an error.
|
|
129
|
+
|
|
130
|
+
## Origin and license
|
|
131
|
+
|
|
132
|
+
The code was extracted from Codua and uses the `codeoutline.*` namespace. CodeOutline is licensed under [BSD-2-Clause](LICENSE); third-party notices are in [THIRD_PARTY.md](docs/THIRD_PARTY.md).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# CodeOutline
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 简体中文
|
|
4
|
+
|
|
5
|
+
Lightweight code indexing and exploration for coding agents, as an MCP server. Powered by Lua.
|
|
6
|
+
|
|
7
|
+
面向编程智能体的轻量代码索引与查询服务:按符号查询带行号的源码、调用路径和上下游关系,自动增量刷新并缓存到磁盘。MCP 协议、stdio 与 Streamable HTTP 传输均由 Lua 实现,服务运行不依赖 Node;npm 包中的 Node 只负责找到对应平台的程序并启动。
|
|
8
|
+
|
|
9
|
+
## 安装与配置
|
|
10
|
+
|
|
11
|
+
需要 Node.js 20 或更新版本。npm 会按系统自动下载对应平台的运行时,无需编译器或 Lua。
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npx -y codeoutline --version
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Claude Code**(全局添加,在任意项目中可用):
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
claude mcp add codeoutline --scope user -- npx -y codeoutline serve --stdio
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**Cursor**(`~/.cursor/mcp.json`):
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{ "mcpServers": { "codeoutline": { "command": "npx", "args": ["-y", "codeoutline", "serve", "--stdio"] } } }
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
未指定项目时,服务依次使用:调用参数 `projectPath`、启动参数 `--project`、客户端 roots(`roots/list` 返回的第一个目录)、服务启动目录。客户端通常在项目目录中启动服务,因此全局配置无需写项目路径。访问范围默认为 `--project` 或启动目录,可用可重复的 `--allow-root` 扩大。
|
|
30
|
+
|
|
31
|
+
提供三个工具:
|
|
32
|
+
|
|
33
|
+
| 工具 | 用途 |
|
|
34
|
+
| --- | --- |
|
|
35
|
+
| `codeoutline_explore` | 按符号或文件名查询源码、调用路径与上下游(参数 `query`,可选 `projectPath`、`budget`) |
|
|
36
|
+
| `codeoutline_status` | 刷新并报告索引、缓存、扫描器与解析统计 |
|
|
37
|
+
| `codeoutline_rebuild` | 绕过缓存完整重建 |
|
|
38
|
+
|
|
39
|
+
不使用 Node 时,可从 [GitHub Releases](https://github.com/1dao/codeoutline/releases) 下载对应平台的原生压缩包,解压后直接运行 `codeoutline`(Windows 为 `codeoutline.cmd`)。
|
|
40
|
+
|
|
41
|
+
## 系统要求
|
|
42
|
+
|
|
43
|
+
| 平台 | 要求 |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Windows | x64,Windows 10 / Server 2016 或更新(原生压缩包最低 Windows 8);Windows 11 ARM64 经 x64 仿真运行。无需 VC++ 运行库 |
|
|
46
|
+
| Linux | x64,glibc 2.28 或更新:RHEL / Rocky / Alma 8 与 9、CentOS Stream 9、Debian 10+、Ubuntu 20.04+。不支持 Alpine/musl |
|
|
47
|
+
| macOS | macOS 11 或更新,Apple Silicon 与 Intel 共用一个通用程序 |
|
|
48
|
+
|
|
49
|
+
Linux 上解码 GBK 源码需要系统 iconv 的 GBK 模块;EL8/EL9 最小安装与容器镜像需另行安装:`dnf install glibc-gconv-extra`。缺少时 UTF-8 项目不受影响,`codeoutline doctor` 会给出提示。
|
|
50
|
+
|
|
51
|
+
## 支持的语言
|
|
52
|
+
|
|
53
|
+
C、C++、C#、Go、Java、JavaScript / TypeScript(含 JSX/TSX)、Lua、Python、Rust。
|
|
54
|
+
|
|
55
|
+
## 命令行
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
codeoutline serve --stdio [--project PATH] [--allow-root PATH ...]
|
|
59
|
+
codeoutline serve --http [--host HOST] [--port PORT] [--project PATH]
|
|
60
|
+
codeoutline explore --project PATH --query QUERY [--budget BYTES]
|
|
61
|
+
codeoutline status [--project PATH]
|
|
62
|
+
codeoutline rebuild [--project PATH]
|
|
63
|
+
codeoutline doctor [--project PATH]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`status`、`rebuild`、`doctor` 输出 JSON;诊断失败返回非零退出码。一次性命令的项目默认为当前目录。
|
|
67
|
+
|
|
68
|
+
## MCP 服务细节
|
|
69
|
+
|
|
70
|
+
协议基线为 [MCP 2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports)。查询预算为 256–262144 字节,默认 16000;超限输出保持 UTF-8 有效并附截断提示。路径均指服务所在机器。
|
|
71
|
+
|
|
72
|
+
stdio 模式下 stdout 只输出 MCP 消息,日志写入 stderr。HTTP 默认只监听本机,客户端地址为 `http://127.0.0.1:19876/mcp`。远程监听需设置至少 16 字节的 `CODEOUTLINE_TOKEN` 并用 `--allow-host` 显式允许主机,客户端使用 `Authorization: Bearer ...`;`--allow-origin` 可重复指定允许的完整 Origin,未配置的浏览器 Origin 被拒绝。远程部署应由 TLS 反向代理保护令牌。
|
|
73
|
+
|
|
74
|
+
主线程处理协议,常驻索引线程串行处理查询。请求含进度 token 时每秒报告进度,HTTP 使用 SSE;没有独立的 GET/SSE 订阅端点(返回 405)。最多 64 个会话、64 个排队或执行中的任务;任务期限 120 秒,会话空闲 15 分钟过期。取消在每个文件的检查点生效,单个文件解析期间无法中断(单文件上限 1.5 MB);取消后丢弃可能不完整的内存索引,下次查询从缓存恢复。
|
|
75
|
+
|
|
76
|
+
## 索引行为与限制
|
|
77
|
+
|
|
78
|
+
缓存位于用户目录 `.codeoutline/cache/<路径 SHA-256>.idx`,带完整性校验,损坏后自动重建;每次写入独立临时文件再原子替换,失败时保留旧文件。默认最多驻留 8 个项目,空闲 15 分钟淘汰。服务使用真实绝对路径统一目录别名与链接,Windows 上忽略 ASCII 大小写。
|
|
79
|
+
|
|
80
|
+
源码编码按需确认:首次索引不逐个检查编码,查询涉及文件时才确认,UTF-8(含 BOM)优先,失败后严格转码 GBK,重新解析并重建调用图后再执行本次查询,不修改原文件。编码结果随缓存保存,文件改变后失效;无法解码的命中文件会明确报错。两种编码都合法时默认 UTF-8。未被查询过的 GBK 文件仍可能有误解析,中文标识符可能漏匹配;用文件名查询可触发该文件的修正。
|
|
81
|
+
|
|
82
|
+
优先用 ripgrep(`rg`)枚举文件并遵守各级 `.gitignore`;未安装 `rg` 时改用目录遍历,只支持根目录 `.gitignore` 的常见规则(不支持否定规则与嵌套忽略文件),并跳过隐藏目录、`node_modules`、`__pycache__` 与符号链接。项目根路径不能包含 `"`、`%`、`!`、`$`、反引号、反斜杠或换行。
|
|
83
|
+
|
|
84
|
+
## 从源码构建
|
|
85
|
+
|
|
86
|
+
运行时来自 [xnet2lua](https://github.com/1dao/xnet2lua) 子模块:
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
git submodule update --init --recursive
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
构建脚本编译 LuaJIT 运行时(开启 xproc、MPSCQ 与 HTTPS),复制到仓库根目录的 `bin/`。Windows 在 MSVC 开发者终端执行,产物静态链接 CRT;macOS 生成最低支持 macOS 11 的通用程序。
|
|
93
|
+
|
|
94
|
+
```powershell
|
|
95
|
+
.\tools\build-runtime.ps1
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
sh tools/build-runtime.sh
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
从源码运行时需显式带 `LOG_STDERR=1`,安装后的 `codeoutline` 会自动添加:
|
|
103
|
+
|
|
104
|
+
```powershell
|
|
105
|
+
.\bin\xnet.exe scripts/codeoutline/command.lua LOG_STDERR=1 serve --stdio --project C:/src/project
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
测试:
|
|
109
|
+
|
|
110
|
+
```powershell
|
|
111
|
+
.\bin\xnet.exe tests/lua/codeoutline_spec.lua
|
|
112
|
+
.\bin\xnet.exe tests/lua/stability_spec.lua
|
|
113
|
+
npm ci
|
|
114
|
+
npm test
|
|
115
|
+
npm run test:package
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`npm test` 使用官方 MCP SDK 验证 stdio 与 HTTP 两种传输;`npm run test:package` 生成真实安装包并在仓库外安装验证。设置 `XSCAN_PURE_LUA=1` 可验证纯 Lua 扫描器路径。打包与发布流程见 [分发说明](docs/DISTRIBUTION.md)。
|
|
119
|
+
|
|
120
|
+
## 嵌入调用
|
|
121
|
+
|
|
122
|
+
```lua
|
|
123
|
+
package.path = 'scripts/?.lua;' .. package.path
|
|
124
|
+
local service = require('codeoutline.service')
|
|
125
|
+
local text, info = service.explore('C:/src/project', 'Session.save', { budget = 16000 })
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`get`、`explore`、`status` 自动刷新;`forget` 只清除内存索引,`rebuild` 绕过磁盘缓存完整重建;`service.configure` 可调整驻留项目数与空闲时间。嵌入 Android 时,宿主须在启动工作线程前调用一次 `xutils_android_init(JavaVM*)`,否则 GBK 转换会明确报错。
|
|
129
|
+
|
|
130
|
+
## 来源与许可
|
|
131
|
+
|
|
132
|
+
代码提取自 Codua,命名空间为 `codeoutline.*`。项目采用 [BSD-2-Clause](LICENSE),第三方依赖声明见 [第三方说明](docs/THIRD_PARTY.md)。
|
package/THIRD_PARTY.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The preview package bundles xnet2lua at the commit recorded in `build-info.json`,
|
|
4
|
+
including its HTTP codec. Its BSD-2-Clause notice is copied into `licenses/`.
|
|
5
|
+
The libdeflate and yyjson notices are also copied from the pinned source tree.
|
|
6
|
+
|
|
7
|
+
CodeOutline uses BSD-2-Clause. Release packages use the LuaJIT runtime
|
|
8
|
+
(`tools/build-runtime.*`); the packaging tool ships the notice for whichever Lua
|
|
9
|
+
the runtime links, recorded as `lua` in `build-info.json`:
|
|
10
|
+
|
|
11
|
+
| Component | Source in xnet2lua | Packaged notice |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| LuaJIT (release; includes Lua 5.1 notice) | `3rd/luajit/` | `licenses/luajit.txt` (MIT) |
|
|
14
|
+
| Lua / minilua (embedded-Lua builds only) | `3rd/minilua.h` | `licenses/lua-minilua.txt` (MIT) |
|
|
15
|
+
| lua-cmsgpack | `xlua/lua_cmsgpack.c` | `licenses/lua-cmsgpack.txt` (MIT) |
|
|
16
|
+
| rpmalloc | `3rd/rpmalloc/` | `licenses/rpmalloc.txt` (source public-domain dedication) |
|
|
17
|
+
| Mbed TLS 3.6.5 | `3rd/mbedtls3/` | `licenses/mbedtls.txt` (Apache-2.0 option) |
|
|
18
|
+
| CodeOutline | `scripts/codeoutline/` | `LICENSE` (BSD-2-Clause) |
|
|
19
|
+
|
|
20
|
+
No ripgrep executable is bundled. An installed `rg` is used when available;
|
|
21
|
+
otherwise the Lua directory walker is used with the limitations in README.md.
|
|
22
|
+
The MCP SDK is a development test dependency and is not in either runtime package.
|
|
23
|
+
|
|
24
|
+
Lua, minilua, cmsgpack, and rpmalloc notices were extracted from the pinned runtime
|
|
25
|
+
sources. Mbed TLS's complete dual-license text is preserved from its
|
|
26
|
+
[v3.6.5 upstream LICENSE](https://github.com/Mbed-TLS/mbedtls/blob/v3.6.5/LICENSE);
|
|
27
|
+
this distribution selects its Apache-2.0 option. The LuaJIT notice is copied from
|
|
28
|
+
`3rd/luajit/COPYRIGHT`. Recheck this inventory when the runtime commit or build
|
|
29
|
+
options change.
|
|
30
|
+
|
|
31
|
+
Staged npm manifests remain `private: true` until platform validation and release
|
|
32
|
+
configuration are complete. The project license does not replace dependency licenses.
|
package/build-info.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"sha256":{"scripts/codeoutline/index_worker.lua":"afcc4751c7d12b3574eab3e617e8f855081690b2ade4c74da3a8c6a55edcd1b2","scripts/codeoutline/version.lua":"a3a170145d80f1ba5bce4976681bc3ff70709c88cf95e0f46a535cf991afbd1b","scripts/codeoutline/lang/csharp.lua":"36ac648b8691c85b8c75d5bcb146fcdfc87992a278e4798f3eb194124e3df2bb","licenses/rpmalloc.txt":"f6c10eb9ec349900767c3dcb8bc71fe4fba2aefea329f05e2608827188016c0f","scripts/codeoutline/lang/js.lua":"7a25a195356deeef7da3fdaf6e8a483b2a3a230cae3064e5dde2a3556fdcbda9","scripts/codeoutline/xscan.lua":"508d1fdccee4e856e0f198992bec45d7c8a9a3c191e0a5f71717741db9e00325","scripts/codeoutline/lang/go.lua":"f5717cbeabe6d30dad72c473fa445480d7fb6b5546bb262e5f4c46185f0959da","licenses/mbedtls.txt":"9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b","scripts/codeoutline/lang/lua.lua":"33b038192425e4db29251674e30c73b7a1af849789c49ff6430ee409c062f812","README.zh-CN.md":"315519e4051bb90bd69575735ba3bab24cf1c99d98166eafea3c8f739f727be6","scripts/codeoutline/cli.lua":"ba996c3c3def65aab08ba60141a7a98a19dfcc1bbe004ab5d8ea14a7f9f9a08b","DISTRIBUTION.md":"ed05652387cf72ebffded83c55a92826d91fe91b08abbed451b8072002870dc0","scripts/codeoutline/lang/python.lua":"f7219c04914673ee6bae387c222b09acd433596c746237bdd6650a4f4087b17c","scripts/codeoutline/command.lua":"a2a0f1ce27f5fb3c2868e6517b85a06e314bb9314c59dcb3de671da7e29462ad","scripts/codeoutline/lang/rust.lua":"f7c21751b1ab08512a406f45bd53546dddfa98ff680b1374d29a4152ae110023","scripts/codeoutline/common.lua":"ee775ed5b2f7ada7a02851f44b51bd4008bceacbf9700576a474e6732e3c03c2","scripts/codeoutline/main.lua":"10e383634dea4f10189beec956be2c321883514981f8cb7895960e0c36947446","scripts/codeoutline/control.lua":"1dfbea9f1397d9fb3c321c48a8d8ee7fc7928e864588226e55247bd548255bb4","scripts/codeoutline/mcp.lua":"3a44ade52415e44b09bbcf9c02cbbf27f054de7936b932a2c26499c1795b14e4","scripts/codeoutline/explore.lua":"d9e4e0d0179d00205df96ad0e7442e7bbc87e27481e6d27eb772ca302b5f35d3","scripts/codeoutline/parse.lua":"ccda7a087dc90109fce7a1e64ebe1de0d7c7036990b81b3423ff14b4299bf38f","scripts/codeoutline/graph.lua":"1ef35f2e92e9db3bbe9b612bb0cb336a9b57b440c9a066e7ba3ef81574326834","scripts/codeoutline/path.lua":"595018dc46a51a5a19bd25694fd92913d2a3ade0c4abe67fb1a8d09b57ba7d23","THIRD_PARTY.md":"a70238f26ec05b7be4b813fa49c337cfb4d3cd64c36fcd27401d121e0e6e38df","README.md":"f831d9893f877c97c40d263114704316e15632ef2fad7ca3a6b293b899e466da","licenses/lua-cmsgpack.txt":"8edfdc5282278a1268d8a6ee52f9245f1a5fe3d1c8065be00330196b1de49873","scripts/codeoutline/service.lua":"597c435309abc0d8149b5e88095896c3bba6516146fd587d53b4b6fbf23a553c","scripts/codeoutline/http.lua":"33802130445b348ce607e9891d4a9789d34b18338bf5d296f56e0b3c7b0c5493","scripts/codeoutline/lang/c.lua":"1251352bcfac6b6d3704460e00b06cf4f41232144748b41b89db04a5ab594073","xnet2lua/scripts/core/share/xhttp_codec.lua":"a5b0f127105ba6dbd4a518a214ca55e22c7510e6b2fc8c25c325898d8346ef8c","xnet2lua/bin/xnet.exe":"f21338b3a20f57568936c292b541ce8c4865b34cb68ea94a8c73d730ce7ec658","licenses/xnet2lua.txt":"1aa8af3df70f60f1ebf2d23e14c27af1606057ad9c32a9a0d15fd76cff257532","scripts/codeoutline/lang/cpp.lua":"96aebcd8972d5272c11446257f37fe90c10f4130c3c1b5bb71c793d7c25456f4","licenses/libdeflate.txt":"41b60f2caab6bffdd5ba360687bd23ca653c0a1235c00380ecffc939b4cd8d75","scripts/codeoutline/text.lua":"75f9af87ff5ce62def74f69d8972a6b11ff660723fc5cf515369ee3012ff0675","LICENSE":"1b63179362acd482b4a9a07ca526b3fce6d9103dcded361de2159ade174568b6","scripts/codeoutline/index.lua":"08c585a7cb264962ac04beb3bf5bc8a9dd22b4f85644b6fdd6a4e527843fbee9","licenses/luajit.txt":"1b10a02c9474cb908da2d87bc908edd8798f9ad28d9a8c53fbd05c13227f7394","scripts/codeoutline/lang/java.lua":"435b6ddcd231679db9e705a604344a3fb6c00b84cc20b2ecd210423ee0b376a6"},"version":"0.1.0","runtimeCommit":"c9fbc0d099b0d82e632bb5d94b4822c69bdba28f","lua":"LuaJIT 2.1.1774896198","sourceCommit":"d524029ea5047d139de762c57273327e5211d209","target":"win32-x64","releaseReady":true,"note":"Release build from a clean checkout","sourceDirty":false}
|
package/codeoutline
ADDED
package/codeoutline.cmd
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright 2016 Eric Biggers
|
|
2
|
+
Copyright 2024 Google LLC
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person
|
|
5
|
+
obtaining a copy of this software and associated documentation files
|
|
6
|
+
(the "Software"), to deal in the Software without restriction,
|
|
7
|
+
including without limitation the rights to use, copy, modify, merge,
|
|
8
|
+
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
9
|
+
and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
19
|
+
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
20
|
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
21
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* Copyright (C) 2012 Salvatore Sanfilippo. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
+
* a copy of this software and associated documentation files (the
|
|
6
|
+
* "Software"), to deal in the Software without restriction, including
|
|
7
|
+
* without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
+
* distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
+
* permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
+
* the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be
|
|
13
|
+
* included in all copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
18
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
19
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
20
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
21
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
|
+
******************************************************************************/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
===============================================================================
|
|
2
|
+
LuaJIT -- a Just-In-Time Compiler for Lua. https://luajit.org/
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2005-2026 Mike Pall. All rights reserved.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
[ MIT license: https://www.opensource.org/licenses/mit-license.php ]
|
|
25
|
+
|
|
26
|
+
===============================================================================
|
|
27
|
+
[ LuaJIT includes code from Lua 5.1/5.2, which has this license statement: ]
|
|
28
|
+
|
|
29
|
+
Copyright (C) 1994-2012 Lua.org, PUC-Rio.
|
|
30
|
+
|
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
32
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
33
|
+
in the Software without restriction, including without limitation the rights
|
|
34
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
35
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
36
|
+
furnished to do so, subject to the following conditions:
|
|
37
|
+
|
|
38
|
+
The above copyright notice and this permission notice shall be included in
|
|
39
|
+
all copies or substantial portions of the Software.
|
|
40
|
+
|
|
41
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
42
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
43
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
44
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
45
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
46
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
47
|
+
THE SOFTWARE.
|
|
48
|
+
|
|
49
|
+
===============================================================================
|
|
50
|
+
[ LuaJIT includes code from dlmalloc, which has this license statement: ]
|
|
51
|
+
|
|
52
|
+
This is a version (aka dlmalloc) of malloc/free/realloc written by
|
|
53
|
+
Doug Lea and released to the public domain, as explained at
|
|
54
|
+
https://creativecommons.org/licenses/publicdomain
|
|
55
|
+
|
|
56
|
+
===============================================================================
|