@crossbind/example-lib-source 2.0.0-beta.50

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/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # @crossbind/example-lib-source
2
+
3
+ ## 2.0.0-beta.50
4
+
5
+ ### Patch Changes
6
+
7
+ - Aligned on the 2.0.0-beta.50 baseline. No source change; the version exists so every package in
8
+ the workspace names the same release.
9
+
10
+ ## 1.0.0
11
+
12
+ ### Major Changes
13
+
14
+ - 🚀 first stable release
15
+
16
+ ## 1.0.0-beta.5
17
+
18
+ ### Patch Changes
19
+
20
+ - chore: add initial version of CHANGELOGS files
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Buğra Sarı and crossbind contributors
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.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # @crossbind/example-lib-source
2
+ **crossbind sample library: simple source library**
3
+
4
+ <a href="https://www.npmjs.com/package/@crossbind/example-lib-source">
5
+ <img alt="NPM version" src="https://img.shields.io/npm/v/@crossbind/example-lib-source?style=for-the-badge" />
6
+ </a>
7
+ <a href="https://github.com/crossbind/crossbind/blob/main/LICENSE">
8
+ <img alt="License" src="https://img.shields.io/github/license/crossbind/crossbind?style=for-the-badge" />
9
+ </a>
10
+
11
+ ## Integration
12
+ Start by installing these package with the following command:
13
+
14
+ ```sh
15
+ npm install @crossbind/example-lib-source
16
+ ```
17
+
18
+ To enable the library, modify the crossbind.config.js file as shown below.
19
+ ```diff
20
+ +import sourceSample from '@crossbind/example-lib-source/crossbind.config.js';
21
+
22
+ export default {
23
+ dependencies: [
24
+ + sourceSample
25
+ ]
26
+ paths: {
27
+ config: import.meta.url,
28
+ },
29
+ };
30
+ ```
31
+
32
+ ## Usage
33
+ Below are the steps to use the library in your C++ or JavaScript code.
34
+
35
+ ### Usage in C++ Code
36
+ ```diff
37
+ +#include <crossbind-lib-samplebasic/samplebasic.h>
38
+
39
+ std::string Native::sample() {
40
+ + return SampleBasic::sample();
41
+ }
42
+
43
+ ```
44
+
45
+ ### Usage in JavaScript Code (web, with plugin)
46
+ ```js
47
+ import { initNative, SampleBasic } from '@crossbind/example-lib-source/crossbind-lib-samplebasic/samplebasic.h';
48
+
49
+ await initNative();
50
+ console.log(SampleBasic.sample());
51
+ ```
@@ -0,0 +1,8 @@
1
+ export default {
2
+ export: {
3
+ type: 'source',
4
+ },
5
+ paths: {
6
+ config: import.meta.url,
7
+ },
8
+ };
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@crossbind/example-lib-source",
3
+ "version": "2.0.0-beta.50",
4
+ "description": "crossbind sample library: simple source library",
5
+ "homepage": "https://github.com/crossbind/crossbind/tree/main/examples/lib-source#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/crossbind/crossbind.git"
9
+ },
10
+ "license": "MIT",
11
+ "type": "module",
12
+ "keywords": [
13
+ "crossbind-sample"
14
+ ]
15
+ }
@@ -0,0 +1,13 @@
1
+ #ifndef _SAMPLE_BASIC_H
2
+ #define _SAMPLE_BASIC_H
3
+
4
+ #include <string>
5
+
6
+ class SampleBasic {
7
+ public:
8
+ static std::string sample() {
9
+ return "this message comes from basic sample lib";
10
+ }
11
+ };
12
+
13
+ #endif