konpeito 0.4.0 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b625a264d0c1f052c3cde2b8bcc08d7dff02f4a292f462d73e218c2fb9af7e59
4
- data.tar.gz: 3fd87bf5f8e81ac6959d0daa8b68f6f48fbf13aedfb6adb68848d1f6e9a569c8
3
+ metadata.gz: 6e006122255b4a6a62dcd3c3ec066b97b9be8e3b3142e4d7c5fc0dd2ccd6b010
4
+ data.tar.gz: afb890b5639796f4085af9191493241c9dff65ef9abb67c204884998743bde06
5
5
  SHA512:
6
- metadata.gz: 5372d88aaca539699920771d4a8dce41589ee8074910a65f2170e71fb7e32775cfc9d397230ee83148587a8665093367c1c264138bf53c30ff1924ce4d6aa724
7
- data.tar.gz: 3381123783ab44d4cc6ebfacc0aaa7afc829fe4b97c2d5e222866bda75ec181f3a76c03a0430538e93411adbc86b5e5c899c606afab8b842b78a4af026485ca4
6
+ metadata.gz: e6c22d15f78ad5963d979d7bd528e39e202032e8bf9296c5ee4a2dd2b4627b117b70bafb766b118ea7d2c22e315da7a1db3837b102e2992c81be1fde10114ff6
7
+ data.tar.gz: db28cfe4761900dd2acadd218dbef736ec4e1b7f8c0debe02827059f3540f4e654438176f3fd9b9dc3d372a3e0e46188f7d5890d2d37a14856a6d3c106eecc68
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to Konpeito will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.1] - 2026-03-09
9
+
10
+ ### Added
11
+ - `THIRD_PARTY_NOTICES.md` — vendored code and linked library license summary
12
+ - `vendor/yyjson/LICENSE` — MIT license file for vendored yyjson
13
+ - mruby backend: auto-generate `<output>.LICENSES.txt` alongside standalone executables
14
+ - Always includes Konpeito (MIT) and mruby (MIT)
15
+ - Conditionally includes yyjson (MIT) when JSON stdlib is used
16
+ - Conditionally includes raylib (zlib) when raylib stdlib is used
17
+
18
+ ### Changed
19
+ - `.gitignore`: allow `vendor/yyjson/LICENSE` to be tracked
20
+
8
21
  ## [0.4.0] - 2026-03-08
9
22
 
10
23
  ### Added
@@ -247,6 +260,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
247
260
  - `%a{extern}` - external C struct wrappers
248
261
  - `%a{simd}` - SIMD vectorization
249
262
 
263
+ [0.4.1]: https://github.com/i2y/konpeito/compare/v0.4.0...v0.4.1
250
264
  [0.4.0]: https://github.com/i2y/konpeito/compare/v0.3.1...v0.4.0
251
265
  [0.3.1]: https://github.com/i2y/konpeito/compare/v0.3.0...v0.3.1
252
266
  [0.3.0]: https://github.com/i2y/konpeito/compare/v0.2.4...v0.3.0
@@ -0,0 +1,56 @@
1
+ # Third-Party Notices
2
+
3
+ Konpeito includes and/or links against the following third-party software.
4
+
5
+ ## Vendored Code
6
+
7
+ ### yyjson
8
+
9
+ - **License**: MIT
10
+ - **Copyright**: Copyright (c) 2020 YaoYuan <ibireme@gmail.com>
11
+ - **Source**: https://github.com/ibireme/yyjson
12
+ - **Location**: `vendor/yyjson/`
13
+ - **Usage**: JSON parsing and generation in the `KonpeitoJSON` stdlib
14
+
15
+ ## Linked Libraries (mruby backend)
16
+
17
+ The mruby backend (`konpeito build --target mruby`) statically links `libmruby.a` into the generated executable. The following libraries may also be linked depending on the stdlibs used.
18
+
19
+ ### mruby
20
+
21
+ - **License**: MIT
22
+ - **Copyright**: Copyright (c) mruby developers
23
+ - **Source**: https://github.com/mruby/mruby
24
+ - **Usage**: Runtime for standalone executables
25
+
26
+ ### raylib (optional)
27
+
28
+ - **License**: zlib/libpng
29
+ - **Copyright**: Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)
30
+ - **Source**: https://github.com/raysan5/raylib
31
+ - **Usage**: Graphics/input stdlib (`module Raylib`)
32
+ - **Linked when**: Code references `module Raylib`
33
+
34
+ ### libcurl (optional)
35
+
36
+ - **License**: MIT/X-inspired (curl license)
37
+ - **Copyright**: Copyright (c) Daniel Stenberg
38
+ - **Source**: https://curl.se/
39
+ - **Usage**: HTTP client stdlib (`KonpeitoHTTP`)
40
+ - **Linked when**: Code uses `KonpeitoHTTP` module
41
+
42
+ ### OpenSSL (optional)
43
+
44
+ - **License**: Apache-2.0
45
+ - **Copyright**: Copyright (c) The OpenSSL Project
46
+ - **Source**: https://www.openssl.org/
47
+ - **Usage**: Cryptography stdlib (`KonpeitoCrypto`)
48
+ - **Linked when**: Code uses `KonpeitoCrypto` module
49
+
50
+ ### zlib (optional)
51
+
52
+ - **License**: zlib
53
+ - **Copyright**: Copyright (c) 1995-2024 Jean-loup Gailly and Mark Adler
54
+ - **Source**: https://zlib.net/
55
+ - **Usage**: Compression stdlib (`KonpeitoCompression`)
56
+ - **Linked when**: Code uses `KonpeitoCompression` module
@@ -62,6 +62,9 @@ module Konpeito
62
62
 
63
63
  # Link into standalone executable
64
64
  link_to_executable(obj_files, output_file)
65
+
66
+ # Generate license file alongside the executable
67
+ generate_license_file
65
68
  ensure
66
69
  # Clean up intermediate files
67
70
  all_temps = [ir_file, obj_file, init_c_file, init_obj_file, helpers_obj_file] + extra_obj_files
@@ -808,6 +811,141 @@ module Konpeito
808
811
  name.gsub(/[^a-zA-Z0-9_]/, "_")
809
812
  end
810
813
 
814
+ # === License file generation ===
815
+
816
+ def generate_license_file
817
+ license_path = "#{output_file}.LICENSES.txt"
818
+ sections = []
819
+
820
+ # Always include Konpeito itself
821
+ sections << license_section(
822
+ "Konpeito",
823
+ "MIT",
824
+ "Copyright (c) Konpeito contributors",
825
+ "https://github.com/i2y/konpeito",
826
+ <<~MIT
827
+ Permission is hereby granted, free of charge, to any person obtaining a copy
828
+ of this software and associated documentation files (the "Software"), to deal
829
+ in the Software without restriction, including without limitation the rights
830
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
831
+ copies of the Software, and to permit persons to whom the Software is
832
+ furnished to do so, subject to the following conditions:
833
+
834
+ The above copyright notice and this permission notice shall be included in all
835
+ copies or substantial portions of the Software.
836
+
837
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
838
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
839
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
840
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
841
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
842
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
843
+ SOFTWARE.
844
+ MIT
845
+ )
846
+
847
+ # Always include mruby (statically linked)
848
+ sections << license_section(
849
+ "mruby",
850
+ "MIT",
851
+ "Copyright (c) mruby developers",
852
+ "https://github.com/mruby/mruby",
853
+ <<~MIT
854
+ Permission is hereby granted, free of charge, to any person obtaining a copy
855
+ of this software and associated documentation files (the "Software"), to deal
856
+ in the Software without restriction, including without limitation the rights
857
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
858
+ copies of the Software, and to permit persons to whom the Software is
859
+ furnished to do so, subject to the following conditions:
860
+
861
+ The above copyright notice and this permission notice shall be included in all
862
+ copies or substantial portions of the Software.
863
+
864
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
865
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
866
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
867
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
868
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
869
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
870
+ SOFTWARE.
871
+ MIT
872
+ )
873
+
874
+ # Include yyjson if JSON stdlib is used
875
+ json_used = @extra_c_files.any? { |f| File.basename(f).include?("json") }
876
+ if json_used
877
+ sections << license_section(
878
+ "yyjson",
879
+ "MIT",
880
+ "Copyright (c) 2020 YaoYuan <ibireme@gmail.com>",
881
+ "https://github.com/ibireme/yyjson",
882
+ <<~MIT
883
+ Permission is hereby granted, free of charge, to any person obtaining a copy
884
+ of this software and associated documentation files (the "Software"), to deal
885
+ in the Software without restriction, including without limitation the rights
886
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
887
+ copies of the Software, and to permit persons to whom the Software is
888
+ furnished to do so, subject to the following conditions:
889
+
890
+ The above copyright notice and this permission notice shall be included in all
891
+ copies or substantial portions of the Software.
892
+
893
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
894
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
895
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
896
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
897
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
898
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
899
+ SOFTWARE.
900
+ MIT
901
+ )
902
+ end
903
+
904
+ # Include raylib if linked
905
+ ffi_libs = @rbs_loader&.all_ffi_libraries || []
906
+ if ffi_libs.any? { |lib| lib.to_s.include?("raylib") }
907
+ sections << license_section(
908
+ "raylib",
909
+ "zlib/libpng",
910
+ "Copyright (c) 2013-2024 Ramon Santamaria (@raysan5)",
911
+ "https://github.com/raysan5/raylib",
912
+ <<~ZLIB
913
+ This software is provided 'as-is', without any express or implied warranty.
914
+ In no event will the authors be held liable for any damages arising from the
915
+ use of this software.
916
+
917
+ Permission is granted to anyone to use this software for any purpose,
918
+ including commercial applications, and to alter it and redistribute it freely,
919
+ subject to the following restrictions:
920
+
921
+ 1. The origin of this software must not be misrepresented; you must not claim
922
+ that you wrote the original software. If you use this software in a product,
923
+ an acknowledgment in the product documentation would be appreciated but is
924
+ not required.
925
+ 2. Altered source versions must be plainly marked as such, and must not be
926
+ misrepresented as being the original software.
927
+ 3. This notice may not be removed or altered from any source distribution.
928
+ ZLIB
929
+ )
930
+ end
931
+
932
+ File.write(license_path, sections.join("\n"))
933
+ end
934
+
935
+ def license_section(name, license_type, copyright, url, license_text)
936
+ <<~SECTION
937
+ ================================================================================
938
+ #{name}
939
+ License: #{license_type}
940
+ #{copyright}
941
+ #{url}
942
+ ================================================================================
943
+
944
+ #{license_text.strip}
945
+
946
+ SECTION
947
+ end
948
+
811
949
  # === Compilation pipeline ===
812
950
 
813
951
  def compile_ir_to_object(ir_file, obj_file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Konpeito
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.1"
5
5
  end
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 YaoYuan <ibireme@gmail.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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konpeito
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasushi Itoh
@@ -56,6 +56,7 @@ files:
56
56
  - LICENSE
57
57
  - README.md
58
58
  - Rakefile
59
+ - THIRD_PARTY_NOTICES.md
59
60
  - bin/konpeito
60
61
  - konpeito.gemspec
61
62
  - lib/konpeito.rb
@@ -216,6 +217,7 @@ files:
216
217
  - tools/konpeito-asm/src/konpeito/runtime/KThread.java
217
218
  - tools/konpeito-asm/src/konpeito/runtime/KTime.java
218
219
  - tools/konpeito-asm/src/konpeito/runtime/RubyDispatch.java
220
+ - vendor/yyjson/LICENSE
219
221
  homepage: https://github.com/i2y/konpeito
220
222
  licenses:
221
223
  - MIT