@effekt-lang/effekt 0.54.0 → 0.56.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/bin/effekt +0 -0
- package/libraries/chez/common/effekt_primitives.ss +10 -4
- package/libraries/common/dictionary.effekt +133 -0
- package/libraries/common/json.effekt +19 -19
- package/libraries/common/list.effekt +16 -0
- package/libraries/common/option.effekt +1 -1
- package/libraries/common/process.effekt +99 -0
- package/libraries/common/random.effekt +1 -1
- package/libraries/common/stream.effekt +109 -4
- package/libraries/common/union_find.effekt +7 -7
- package/libraries/js/effekt_builtins.js +1 -1
- package/libraries/llvm/forward-declare-c.ll +2 -2
- package/libraries/llvm/io.c +197 -2
- package/libraries/llvm/panic.c +2 -0
- package/libraries/llvm/rts.ll +16 -38
- package/licenses/eclipse public license, version 2.0 - epl-2.0.html +3 -3
- package/licenses/mit license - mit-license.html +96 -64
- package/licenses/the bsd license - bsd-license.html +96 -64
- package/licenses/the mit license - mit.html +95 -63
- package/package.json +1 -1
package/libraries/llvm/io.c
CHANGED
|
@@ -143,8 +143,8 @@ void c_fs_read(Int file, struct Pos buffer, Int offset, Int size, Int position,
|
|
|
143
143
|
if (result < 0) {
|
|
144
144
|
uv_fs_req_cleanup(request);
|
|
145
145
|
free(request);
|
|
146
|
+
free(read_closure);
|
|
146
147
|
resume_Int(stack, result);
|
|
147
|
-
free(read_closure);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
@@ -166,8 +166,8 @@ void c_fs_write(Int file, struct Pos buffer, Int offset, Int size, Int position,
|
|
|
166
166
|
if (result < 0) {
|
|
167
167
|
uv_fs_req_cleanup(request);
|
|
168
168
|
free(request);
|
|
169
|
+
free(write_closure);
|
|
169
170
|
resume_Int(stack, result);
|
|
170
|
-
free(write_closure);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -627,4 +627,199 @@ void c_signal_notify(struct Pos signal, struct Pos value, Stack stack) {
|
|
|
627
627
|
}
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
+
// Subprocesses
|
|
631
|
+
// ------------
|
|
632
|
+
|
|
633
|
+
struct Pos c_spawn_options_default() {
|
|
634
|
+
uv_process_options_t* options = (uv_process_options_t*)malloc(sizeof(uv_process_options_t));
|
|
635
|
+
memset(options, 0, sizeof(uv_process_options_t));
|
|
636
|
+
uv_stdio_container_t* stdio = (uv_stdio_container_t*)malloc(3*sizeof(uv_stdio_container_t));
|
|
637
|
+
stdio[0].flags = UV_INHERIT_FD;
|
|
638
|
+
stdio[0].data.fd = 0;
|
|
639
|
+
stdio[1].flags = UV_INHERIT_FD;
|
|
640
|
+
stdio[1].data.fd = 1;
|
|
641
|
+
stdio[2].flags = UV_INHERIT_FD;
|
|
642
|
+
stdio[2].data.fd = 2;
|
|
643
|
+
options->stdio = stdio;
|
|
644
|
+
options->stdio_count = 3;
|
|
645
|
+
return (struct Pos) { .tag = 0, .obj = options, };
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
static void subproc_alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) {
|
|
649
|
+
(void)handle;
|
|
650
|
+
buf->base = malloc(suggested_size);
|
|
651
|
+
buf->len = suggested_size;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
typedef struct {
|
|
655
|
+
struct Pos handler;
|
|
656
|
+
} subproc_stream_cb_closure_t;
|
|
657
|
+
void subproc_stream_cb(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) {
|
|
658
|
+
subproc_stream_cb_closure_t* clos = (subproc_stream_cb_closure_t*)(stream->data);
|
|
659
|
+
if(nread >= 0) {
|
|
660
|
+
struct Pos chunk = c_bytearray_construct(nread, (uint8_t*)(buf->base));
|
|
661
|
+
if (buf->base) free(buf->base);
|
|
662
|
+
run_Pos(clos->handler, chunk);
|
|
663
|
+
} else {
|
|
664
|
+
uv_read_stop(stream);
|
|
665
|
+
erasePositive(clos->handler);
|
|
666
|
+
free(clos);
|
|
667
|
+
if (buf->base) free(buf->base);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
struct Pos subproc_options_on_stream(struct Pos opts, size_t id, uv_stdio_flags flags, struct Pos callback) {
|
|
671
|
+
uv_process_options_t* options = (uv_process_options_t*)opts.obj;
|
|
672
|
+
|
|
673
|
+
options->stdio[id].flags = UV_CREATE_PIPE | flags;
|
|
674
|
+
uv_pipe_t* pipe = (uv_pipe_t*)malloc(sizeof(uv_pipe_t));
|
|
675
|
+
|
|
676
|
+
uv_pipe_init(uv_default_loop(), pipe, 1);
|
|
677
|
+
options->stdio[id].data.stream = (uv_stream_t*)pipe;
|
|
678
|
+
|
|
679
|
+
subproc_stream_cb_closure_t* clos = (subproc_stream_cb_closure_t*)malloc(sizeof(subproc_stream_cb_closure_t));
|
|
680
|
+
clos->handler = callback;
|
|
681
|
+
pipe->data = clos;
|
|
682
|
+
|
|
683
|
+
return opts;
|
|
684
|
+
}
|
|
685
|
+
struct Pos c_spawn_options_on_stdout(struct Pos opts, struct Pos callback) {
|
|
686
|
+
return subproc_options_on_stream(opts, 1, UV_WRITABLE_PIPE, callback);
|
|
687
|
+
}
|
|
688
|
+
struct Pos c_spawn_options_on_stderr(struct Pos opts, struct Pos callback) {
|
|
689
|
+
return subproc_options_on_stream(opts, 2, UV_WRITABLE_PIPE, callback);
|
|
690
|
+
}
|
|
691
|
+
struct Pos c_spawn_options_pipe_stdin(struct Pos opts, struct Pos callback) {
|
|
692
|
+
return subproc_options_on_stream(opts, 0, UV_READABLE_PIPE, callback);
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
typedef struct {
|
|
697
|
+
char** args;
|
|
698
|
+
Stack k;
|
|
699
|
+
uv_process_options_t* opts;
|
|
700
|
+
} subproc_proc_data_t;
|
|
701
|
+
void c_close_stream_callback_exit(uv_handle_t* req) {
|
|
702
|
+
free(req);
|
|
703
|
+
}
|
|
704
|
+
void subproc_on_close(uv_handle_t* handle) {
|
|
705
|
+
subproc_proc_data_t* pd = (subproc_proc_data_t*)((uv_process_t*)handle)->data;
|
|
706
|
+
uv_process_options_t* opts = (uv_process_options_t*)(pd->opts);
|
|
707
|
+
if(opts->stdio[0].flags & UV_CREATE_PIPE){
|
|
708
|
+
uv_close((uv_handle_t*)(opts->stdio[0].data.stream), c_close_stream_callback_exit);
|
|
709
|
+
}
|
|
710
|
+
if(opts->stdio[1].flags & UV_CREATE_PIPE){
|
|
711
|
+
uv_close((uv_handle_t*)(opts->stdio[1].data.stream), c_close_stream_callback_exit);
|
|
712
|
+
}
|
|
713
|
+
if(opts->stdio[2].flags & UV_CREATE_PIPE){
|
|
714
|
+
uv_close((uv_handle_t*)(opts->stdio[2].data.stream), c_close_stream_callback_exit);
|
|
715
|
+
}
|
|
716
|
+
// TODO shutdown pipes for stdio
|
|
717
|
+
free(opts->stdio);
|
|
718
|
+
free(opts);
|
|
719
|
+
free(pd);
|
|
720
|
+
free(handle);
|
|
721
|
+
}
|
|
722
|
+
void subproc_on_exit(uv_process_t* proc, int64_t exit_status, int term_signal) {
|
|
723
|
+
(void)term_signal; (void)exit_status;
|
|
724
|
+
subproc_proc_data_t* pd = (subproc_proc_data_t*)proc->data;
|
|
725
|
+
if (pd->args) {
|
|
726
|
+
for(int i = 0; pd->args[i] != NULL; i++) {
|
|
727
|
+
free(pd->args[i]);
|
|
728
|
+
}
|
|
729
|
+
free(pd->args);
|
|
730
|
+
}
|
|
731
|
+
Stack k = pd->k;
|
|
732
|
+
uv_close((uv_handle_t*)proc, subproc_on_close);
|
|
733
|
+
resume_Int(k, exit_status);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
void c_close_stream_callback(uv_shutdown_t* req, int status) {
|
|
737
|
+
if(status != 0){
|
|
738
|
+
// TODO error handling
|
|
739
|
+
}
|
|
740
|
+
free(req);
|
|
741
|
+
}
|
|
742
|
+
void c_close_stream(struct Pos stream) {
|
|
743
|
+
uv_stream_t* str = (uv_stream_t*)stream.obj;
|
|
744
|
+
uv_shutdown_t* req = (uv_shutdown_t*)malloc(sizeof(uv_shutdown_t));
|
|
745
|
+
uv_shutdown(req, str, c_close_stream_callback);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
typedef struct {
|
|
749
|
+
struct Pos buffer;
|
|
750
|
+
uv_buf_t buf;
|
|
751
|
+
} subproc_write_req_data_t;
|
|
752
|
+
void c_write_stream_callback(uv_write_t* req, int status) {
|
|
753
|
+
if(status != 0){
|
|
754
|
+
// TODO error handling
|
|
755
|
+
}
|
|
756
|
+
subproc_write_req_data_t* data = (subproc_write_req_data_t*)(req->data);
|
|
757
|
+
erasePositive(data->buffer);
|
|
758
|
+
free(data);
|
|
759
|
+
free(req);
|
|
760
|
+
}
|
|
761
|
+
void c_write_stream(struct Pos stream, struct Pos buffer) {
|
|
762
|
+
uv_stream_t* str = (uv_stream_t*)stream.obj;
|
|
763
|
+
uv_write_t* req = (uv_write_t*)malloc(sizeof(uv_write_t));
|
|
764
|
+
memset(req, 0, sizeof(uv_write_t));
|
|
765
|
+
subproc_write_req_data_t* data = (subproc_write_req_data_t*)malloc(sizeof(subproc_write_req_data_t));
|
|
766
|
+
data->buffer = buffer;
|
|
767
|
+
uv_buf_t buf = uv_buf_init((char*)(c_bytearray_data(buffer)), buffer.tag);
|
|
768
|
+
req->data = data;
|
|
769
|
+
data->buf = buf;
|
|
770
|
+
uv_write(req, str, &(data->buf), 1, c_write_stream_callback);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
void c_spawn(struct Pos cmd, struct Pos args, struct Pos options, Stack stack) {
|
|
774
|
+
uv_process_options_t* opts = (uv_process_options_t*)options.obj;
|
|
775
|
+
uv_process_t* proc = (uv_process_t*)malloc(sizeof(uv_process_t));
|
|
776
|
+
|
|
777
|
+
// command
|
|
778
|
+
char* cmd_s = c_bytearray_into_nullterminated_string(cmd);
|
|
779
|
+
erasePositive(cmd);
|
|
780
|
+
opts->file = cmd_s;
|
|
781
|
+
|
|
782
|
+
// args
|
|
783
|
+
int _argc = (int)((uint64_t*)args.obj)[2];
|
|
784
|
+
char** _args = (char**)malloc((2 + _argc) * sizeof(char*));
|
|
785
|
+
struct Pos* _argv = (struct Pos*)(((uint64_t*)args.obj) + 3);
|
|
786
|
+
_args[0] = cmd_s;
|
|
787
|
+
for(int i = 0; i < _argc; i++) {
|
|
788
|
+
_args[i + 1] = c_bytearray_into_nullterminated_string(_argv[i]);
|
|
789
|
+
}
|
|
790
|
+
erasePositive(args);
|
|
791
|
+
_args[_argc + 1] = NULL;
|
|
792
|
+
opts->args = _args;
|
|
793
|
+
// callback to free _args
|
|
794
|
+
opts->exit_cb = subproc_on_exit;
|
|
795
|
+
subproc_proc_data_t* pd = (subproc_proc_data_t*)malloc(sizeof(subproc_proc_data_t));
|
|
796
|
+
pd->args = _args;
|
|
797
|
+
pd->k = stack;
|
|
798
|
+
proc->data = pd;
|
|
799
|
+
|
|
800
|
+
// spawn process
|
|
801
|
+
int err = uv_spawn(uv_default_loop(), proc, opts);
|
|
802
|
+
|
|
803
|
+
if(opts->stdio[0].flags & UV_CREATE_PIPE) {
|
|
804
|
+
uv_stream_t* stream = (uv_stream_t*)(opts->stdio[0].data.stream);
|
|
805
|
+
subproc_stream_cb_closure_t* clos = (subproc_stream_cb_closure_t*)(stream->data);
|
|
806
|
+
struct Pos str = (struct Pos) { .tag = 0, .obj = stream, };
|
|
807
|
+
run_Pos(clos->handler, str);
|
|
808
|
+
erasePositive(clos->handler);
|
|
809
|
+
free(clos);
|
|
810
|
+
}
|
|
811
|
+
if(opts->stdio[1].flags & UV_CREATE_PIPE)
|
|
812
|
+
uv_read_start((uv_stream_t*)(opts->stdio[1].data.stream), subproc_alloc_cb, subproc_stream_cb);
|
|
813
|
+
if(opts->stdio[2].flags & UV_CREATE_PIPE)
|
|
814
|
+
uv_read_start((uv_stream_t*)(opts->stdio[2].data.stream), subproc_alloc_cb, subproc_stream_cb);
|
|
815
|
+
pd->opts = opts;
|
|
816
|
+
|
|
817
|
+
erasePositive(options);
|
|
818
|
+
if(err) {
|
|
819
|
+
printf("%s\n", uv_strerror(err));
|
|
820
|
+
free(_args);
|
|
821
|
+
free(proc);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
|
|
630
825
|
#endif
|
package/libraries/llvm/panic.c
CHANGED
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
// this should _morally_ be using `stderr`, but we don't tee it in tests
|
|
8
8
|
// see PR #823 & issue #815 for context
|
|
9
9
|
|
|
10
|
+
__attribute__((cold))
|
|
10
11
|
void hole(const char* message) {
|
|
11
12
|
printf("PANIC: %s not implemented yet\n", message);
|
|
12
13
|
exit(1);
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
__attribute__((cold))
|
|
15
17
|
void duplicated_prompt() {
|
|
16
18
|
printf("PANIC: Continuation invoked itself\n");
|
|
17
19
|
exit(1);
|
package/libraries/llvm/rts.ll
CHANGED
|
@@ -407,7 +407,7 @@ define private void @invalidate(%Stack %stack, %Stack %end) {
|
|
|
407
407
|
|
|
408
408
|
error:
|
|
409
409
|
call void @duplicated_prompt()
|
|
410
|
-
|
|
410
|
+
unreachable
|
|
411
411
|
|
|
412
412
|
check:
|
|
413
413
|
%isEnd = icmp eq %Stack %next, %end
|
|
@@ -690,15 +690,13 @@ define private %Stack @withEmptyStack() {
|
|
|
690
690
|
ret %Stack %stack
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
define void @resume_Int(%Stack %stack, %Int %
|
|
694
|
-
%
|
|
695
|
-
|
|
696
|
-
%returnAddress = load %ReturnAddress, ptr %returnAddressPointer, !alias.scope !12, !noalias !22
|
|
697
|
-
tail call tailcc void %returnAddress(%Int %argument, %Stack %stack)
|
|
693
|
+
define ccc void @resume_Int(%Stack %stack, %Int %integer) {
|
|
694
|
+
%argument = call ccc %Pos @coerceIntPos(%Int %integer)
|
|
695
|
+
call ccc void @resume_Pos(%Stack %stack, %Pos %argument)
|
|
698
696
|
ret void
|
|
699
697
|
}
|
|
700
698
|
|
|
701
|
-
define void @resume_Pos(%Stack %stack, %Pos %argument) {
|
|
699
|
+
define ccc void @resume_Pos(%Stack %stack, %Pos %argument) {
|
|
702
700
|
%stackPointer = call ccc %StackPointer @stackDeallocate(%Stack %stack, i64 24)
|
|
703
701
|
%returnAddressPointer = getelementptr %FrameHeader, %StackPointer %stackPointer, i64 0, i32 0
|
|
704
702
|
%returnAddress = load %ReturnAddress, ptr %returnAddressPointer, !alias.scope !12, !noalias !22
|
|
@@ -706,56 +704,36 @@ define void @resume_Pos(%Stack %stack, %Pos %argument) {
|
|
|
706
704
|
ret void
|
|
707
705
|
}
|
|
708
706
|
|
|
709
|
-
define void @run(%Pos %boxed) {
|
|
710
|
-
; unbox
|
|
711
|
-
%f = call %Neg @coercePosNeg(%Pos %boxed)
|
|
707
|
+
define ccc void @run(%Pos %boxed) {
|
|
712
708
|
|
|
713
|
-
|
|
709
|
+
%function = call %Neg @coercePosNeg(%Pos %boxed)
|
|
714
710
|
%stack = call %Stack @withEmptyStack()
|
|
715
711
|
|
|
716
|
-
|
|
717
|
-
%
|
|
718
|
-
%object = extractvalue %Neg %f, 1
|
|
712
|
+
%arrayPointer = extractvalue %Neg %function, 0
|
|
713
|
+
%object = extractvalue %Neg %function, 1
|
|
719
714
|
%functionPointerPointer = getelementptr ptr, ptr %arrayPointer, i64 0
|
|
720
715
|
%functionPointer = load ptr, ptr %functionPointerPointer, !alias.scope !15, !noalias !25
|
|
721
716
|
|
|
722
|
-
; call
|
|
723
717
|
tail call tailcc %Pos %functionPointer(%Object %object, %Stack %stack)
|
|
724
718
|
ret void
|
|
725
719
|
}
|
|
726
720
|
|
|
727
|
-
define void @run_Int(%Pos %boxed,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
; fresh stack
|
|
732
|
-
%stack = call %Stack @withEmptyStack()
|
|
733
|
-
|
|
734
|
-
; prepare call
|
|
735
|
-
%arrayPointer = extractvalue %Neg %f, 0
|
|
736
|
-
%object = extractvalue %Neg %f, 1
|
|
737
|
-
%functionPointerPointer = getelementptr ptr, ptr %arrayPointer, i64 0
|
|
738
|
-
%functionPointer = load ptr, ptr %functionPointerPointer, !alias.scope !15, !noalias !25
|
|
739
|
-
|
|
740
|
-
; call
|
|
741
|
-
tail call tailcc %Pos %functionPointer(%Object %object, i64 %argument, %Stack %stack)
|
|
721
|
+
define ccc void @run_Int(%Pos %boxed, %Int %integer) {
|
|
722
|
+
%argument = call ccc %Pos @coerceIntPos(%Int %integer)
|
|
723
|
+
call ccc %Pos @run_Pos(%Pos %boxed, %Pos %argument)
|
|
742
724
|
ret void
|
|
743
725
|
}
|
|
744
726
|
|
|
745
|
-
define void @run_Pos(%Pos %boxed, %Pos %argument) {
|
|
746
|
-
; unbox
|
|
747
|
-
%f = call %Neg @coercePosNeg(%Pos %boxed)
|
|
727
|
+
define ccc void @run_Pos(%Pos %boxed, %Pos %argument) {
|
|
748
728
|
|
|
749
|
-
|
|
729
|
+
%function = call ccc %Neg @coercePosNeg(%Pos %boxed)
|
|
750
730
|
%stack = call %Stack @withEmptyStack()
|
|
751
731
|
|
|
752
|
-
|
|
753
|
-
%
|
|
754
|
-
%object = extractvalue %Neg %f, 1
|
|
732
|
+
%arrayPointer = extractvalue %Neg %function, 0
|
|
733
|
+
%object = extractvalue %Neg %function, 1
|
|
755
734
|
%functionPointerPointer = getelementptr ptr, ptr %arrayPointer, i64 0
|
|
756
735
|
%functionPointer = load ptr, ptr %functionPointerPointer, !alias.scope !15, !noalias !25
|
|
757
736
|
|
|
758
|
-
; call
|
|
759
737
|
tail call tailcc %Pos %functionPointer(%Object %object, %Pos %argument, %Stack %stack)
|
|
760
738
|
ret void
|
|
761
739
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!doctype html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Eclipse Public License 2.0 (EPL) | The Eclipse Foundation</title>
|
|
2
|
-
<meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/og-image.jpg"><meta name=twitter:image content="https://www.eclipse.org/images/og-image.jpg"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.144.2"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=/legal/epl-2.0/index.xml type=application/rss+xml title><link rel=stylesheet href="/public/css/styles.css?v=
|
|
2
|
+
<meta property="og:title" content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=twitter:title content="Eclipse Public License 2.0 (EPL) | The Eclipse Foundation"><meta name=description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta property="og:description" content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=twitter:description content="The Eclipse Foundation provides our global community of individuals and organisations with a mature, scalable, and business-friendly environment for open source …"><meta name=author content="Wayne Beaton"><link href=/favicon.ico rel=icon type=image/x-icon><meta property="og:image" content="https://www.eclipse.org/images/og-image.jpg"><meta name=twitter:image content="https://www.eclipse.org/images/og-image.jpg"><meta name=twitter:card content="summary"><meta name=twitter:site content="@eclipsefdn"><meta name=twitter:creator content="@eclipsefdn"><meta property="og:url" content="https://www.eclipse.org/legal/epl-2.0/"><meta property="og:type" content="website"><meta property="og:site_name" content="Eclipse Foundation"><meta name=keywords content="epl,epl-2.0,legal,foundation,eclipse,eclipse public license,license,licenses"><meta name=generator content="Hugo 0.144.2"><link rel=canonical href=https://www.eclipse.org/legal/epl-2.0/><link rel=alternate href=/legal/epl-2.0/index.xml type=application/rss+xml title><link rel=stylesheet href="/public/css/styles.css?v=1766497060"><script>(function(e,t,n,s,o){e[s]=e[s]||[],e[s].push({"gtm.start":(new Date).getTime(),event:"gtm.js"});var a=t.getElementsByTagName(n)[0],i=t.createElement(n),r=s!="dataLayer"?"&l="+s:"";i.async=!0,i.src="https://www.googletagmanager.com/gtm.js?id="+o+r,a.parentNode.insertBefore(i,a)})(window,document,"script","dataLayer","GTM-5WLCZXC")</script><script>var tableClasses="table"</script><link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel=stylesheet type=text/css></head><body><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5WLCZXC" height=0 width=0 style=display:none;visibility:hidden></iframe></noscript><a href=#main class=skip-link>Skip to content</a><div class=eclipsefdn-featured-story-banner data-publish-target=eclipse_org></div><header class="header-wrapper header-wrapper" id=header><div class="navigation-bar dark"><div class=container><div class=navigation-bar-inner><div class=navigation-bar-left><a class="focus-highlight focus-inverse" href=/><img class=navigation-bar-brand src=https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white-orange.svg alt="Eclipse Foundation"></a></div><nav class="navigation-bar-nav hidden-xs hidden-sm"><ul><li><button type=button class="btn btn-link" data-target=join-us-menu>Join us</button></li><li><button type=button class="btn btn-link" data-target=what-we-do-menu>What we do</button></li><li><button type=button class="btn btn-link" data-target=resources-menu>Resources</button></li><li><button type=button class="btn btn-link" data-target=about-us-menu>About us</button></li></ul></nav><div class=navigation-bar-right><div class="navigation-bar-controls hidden-xs hidden-sm"><ul><li class=dropdown><a class="dropdown-toggle link-unstyled focus-highlight" tabindex=0 id=search-dropdown-toggle data-toggle=dropdown href=# aria-label=Search><i class="fa-solid fa-magnifying-glass" aria-hidden=true></i></a><form class="search-bar dropdown-menu dropdown-menu-right" aria-labelledby=search-dropdown-toggle action=https://www.eclipse.org/home/search/ method=get><input class=search-bar-input name=q placeholder=Search>
|
|
3
3
|
<button class="btn btn-link" type=submit>
|
|
4
4
|
<i class="fa-solid fa-arrow-right"></i></button></form></li><li class=dropdown><a class="dropdown-toggle focus-highlight" id=user-menu href=# data-toggle=dropdown aria-haspopup=true aria-expanded=false tabindex=0><i class="fa-regular fa-user" aria-hidden=true></i></a><ul class="dropdown-menu dropdown-menu-right" aria-labelledby=user-menu><li><a href=https://accounts.eclipse.org/user><i class="fa-solid fa-user margin-right-10" aria-hidden=true></i>
|
|
5
5
|
View my account</a></li><li><a href=https://accounts.eclipse.org/user/edit><i class="fa-solid fa-edit margin-right-10" aria-hidden=true></i>
|
|
@@ -30,7 +30,7 @@ Manage cookies</a></li></ul></li></ul></div><div class="navigation-bar-ctas hidd
|
|
|
30
30
|
<i class="external-icon fa-solid fa-arrow-up-right-from-square" aria-hidden=true></i></li><li><a href=https://www.eclipse.org/topics/automotive-and-mobility/>Automotive & mobility</a></li><li><a href=https://orcwg.org/ target=_blank>Policy & compliance</a>
|
|
31
31
|
<i class="external-icon fa-solid fa-arrow-up-right-from-square" aria-hidden=true></i></li></ul></div><div class=submenu style=grid-column:-3;margin-top:-20rem><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-flag" aria-hidden=true></i></span><h2 class=menu-heading>Strategic services</h2></div><ul><li><a href=https://www.eclipse.org/research/>Transform research into open source</a></li><li><a href=https://www.eclipse.org/os4biz/services/>Engage professional services</a></li><li><a href=https://www.eclipse.org/os4biz/ospo/>Build your OSPO</a></li></ul></div></nav></div></div><div class="menu hidden" id=resources-menu><div class=container><nav><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-bullhorn" aria-hidden=true></i></span><h2 class=menu-heading>What's happening</h2></div><ul><li><a href=https://blogs.eclipse.org/>Read our blog</a></li><li><a href=https://accounts.eclipse.org/mailing-list>Join mailing lists</a></li><li><a href=https://newsroom.eclipse.org/>Get news updates</a></li><li><a href=https://www.eclipse.org/community/eclipse_newsletter>Subscribe to newsletter</a></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-calendar-days" aria-hidden=true></i></span><h2 class=menu-heading>Events</h2></div><ul><li><a href=https://events.eclipse.org/>Explore events</a></li><li><a href=https://www.eclipse.org/events/open-community-meetups/>Join a community meetup</a></li><li><a href=https://www.eclipse.org/events/open-community-webinars/>Attend a webinar</a></li><li><a href=https://www.ocxconf.org/ target=_blank>Join OCX</a>
|
|
32
32
|
<i class="external-icon fa-solid fa-arrow-up-right-from-square" aria-hidden=true></i></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-code" aria-hidden=true></i></span><h2 class=menu-heading>Developer resources</h2></div><ul><li><a href=https://www.eclipse.org/projects/>Explore projects hub</a></li><li><a href=https://www.eclipse.org/projects/calendar/#office-hours>Attend office hours</a></li><li><a href=https://www.eclipse.org/security/>Report a vulnerability</a></li><li><a href=https://www.eclipse.org/security/known/>View known vulnerabilities</a></li><li><a href=https://github.com/eclipse-csi/security-handbook/blob/main/docs/vulnerabilities/advisories.md target=_blank>Use the security handbook</a></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-gear" aria-hidden=true></i></span><h2 class=menu-heading>Industry insights</h2></div><ul><li><a href=https://www.eclipse.org/org/value/#success_stories>View case studies</a></li><li><a href=https://www.eclipse.org/org/value/#whitepapers>View whitepapers</a></li><li><a href=https://www.eclipse.org/org/value/#surveyReports>View surveys & reports</a></li></ul></div><div class=submenu style=grid-column:-2;margin-top:-6rem><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-store" aria-hidden=true></i></span><h2 class=menu-heading>Marketplaces</h2></div><ul><li><a href=https://adoptium.net/>Adoptium</a></li><li><a href=https://marketplace.eclipse.org/>Eclipse IDE</a></li><li><a href=https://open-vsx.org/>Open VSX</a></li></ul></div></nav></div></div><div class="menu hidden" id=about-us-menu><div class=container><nav><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-regular fa-moon rotate-90" aria-hidden=true></i></span><h2 class=menu-heading>The Foundation</h2></div><ul><li><a href=https://www.eclipse.org/about/>About</a></li><li><a href=https://www.eclipse.org/org/foundation/staff/>Meet the team</a></li><li><a href=https://www.eclipse.org/org/governance/>Board & governance</a></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-user-group" aria-hidden=true></i></span><h2 class=menu-heading>Our members</h2></div><ul><li><a href=https://www.eclipse.org/membership/>Become a member</a></li><li><a href=https://www.eclipse.org/membership/explore-membership/>View member directory</a></li><li><a href=https://membership.eclipse.org/portal target=_blank>Access member portal</a></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-regular fa-bookmark" aria-hidden=true></i></span><h2 class=menu-heading>Sponsorship</h2></div><ul><li><a href=https://www.eclipse.org/sponsor/>Become a sponsor</a></li><li><a href=https://www.eclipse.org/org/our-sponsors/>Sponsor directory</a></li></ul></div><div class=submenu><div class=menu-heading-group><span class=menu-pre><i class="fa-solid fa-cube" aria-hidden=true></i></span><h2 class=menu-heading>More</h2></div><ul><li><a href=https://www.eclipse.org/careers/>Join our team</a></li><li><a href=https://www.eclipse.org/org/artwork/>Explore our brand</a></li><li><a href=https://www.eclipse.org/org/foundation/contact.php>Contact us</a></li></ul></div></nav></div></div></div></header><main id=main><nav aria-label=Breadcrumb><div class=container><ol class=breadcrumb><li><a href=https://www.eclipse.org/>Home</a></li><li><a href=https://www.eclipse.org/legal/>Eclipse Foundation Legal …</a></li><li class=active>Eclipse Public License 2.0 (EPL)</li></ol></div></nav><div class="container padding-bottom-30"><div class=row><div class=col-md-6><aside class=sidebar><a class="sidebar-toggle sidebar-toggle-open" type=button href=#sidebar-open><i class="fa-solid fa-bars" aria-hidden=true></i>
|
|
33
|
-
</a><a class="sidebar-toggle sidebar-toggle-close" type=button href=#sidebar-close><i class="fa-solid fa-close" aria-hidden=true></i></a><nav><ul class=sidebar-menu><li class=menu-group><a href=#legal data-toggle=collapse aria-expanded=true class=dropdown-toggle>Legal</a><ul class="collapse in" id=legal><li class=menu-subgroup><a href=#legal-eca data-toggle=collapse aria-expanded=false class=dropdown-toggle>ECA</a><ul class=collapse id=legal-eca><li><a href=/legal/eca>About</a></li><li><a href=https://accounts.eclipse.org/user/eca>Sign</a></li><li><a href=https://accounts.eclipse.org/user/eca>Validation Tool</a></li></ul></li><li class=menu-subgroup><a href=#legal-epl-20 data-toggle=collapse aria-expanded=false class=dropdown-toggle>EPL-2.0</a><ul class=collapse id=legal-epl-20><li><a href=/legal/epl-2.0/>About</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.html>Plain HTML</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.txt>Plain Text</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.pdf>PDF</a></li><li><a href=/legal/epl-2.0/faq/>FAQ</a></li></ul></li><li class=menu-subgroup><a href=#legal-epl-10 data-toggle=collapse aria-expanded=false class=dropdown-toggle>EPL-1.0</a><ul class=collapse id=legal-epl-10><li><a href=/org/documents/epl-v10.php>About</a></li><li><a href=/org/documents/epl-v10.html>Plain HTML</a></li><li><a href=/org/documents/epl-1.0/EPL-1.0.txt>Plain Text</a></li><li><a href=/legal/epl/faq>FAQ</a></li></ul></li><li class=menu-subgroup><a href=#legal-licenses data-toggle=collapse aria-expanded=false class=dropdown-toggle>Licenses</a><ul class=collapse id=legal-licenses><li><a href=/legal/licenses#approved>Approved 3rd Party</a></li><li><a href=/legal/licenses#nonapproved>Non Approved</a></li><li><a href=/projects/handbook/#ip-copyright-headers>File Headers</a></li><li><a href=/legal/non-code-licenses>Docs & Examples</a></li></ul></li><li class=menu-subgroup><a href=#legal-specs data-toggle=collapse aria-expanded=false class=dropdown-toggle>Specifications</a><ul class=collapse id=legal-specs><li><a href=/projects/efsp/>Specifications Process</a></li><li><a href=/projects/efsp/operations.php>Specifications Operations</a></li><li><a href=/legal/efsl>Specification License</a></li><li><a href=/legal/tck>TCK License</a></li></ul></li></ul></li></ul></nav></aside></div><div class=col-md-18><div id=content></div><script async src=/public/js/generate-body-content.js type=text/javascript></script></div></main><aside class=featured-footer id=featured-footer
|
|
33
|
+
</a><a class="sidebar-toggle sidebar-toggle-close" type=button href=#sidebar-close><i class="fa-solid fa-close" aria-hidden=true></i></a><nav><ul class=sidebar-menu><li class=menu-group><a href=#legal data-toggle=collapse aria-expanded=true class=dropdown-toggle>Legal</a><ul class="collapse in" id=legal><li class=menu-subgroup><a href=#legal-eca data-toggle=collapse aria-expanded=false class=dropdown-toggle>ECA</a><ul class=collapse id=legal-eca><li><a href=/legal/eca>About</a></li><li><a href=https://accounts.eclipse.org/user/eca>Sign</a></li><li><a href=https://accounts.eclipse.org/user/eca>Validation Tool</a></li></ul></li><li class=menu-subgroup><a href=#legal-epl-20 data-toggle=collapse aria-expanded=false class=dropdown-toggle>EPL-2.0</a><ul class=collapse id=legal-epl-20><li><a href=/legal/epl-2.0/>About</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.html>Plain HTML</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.txt>Plain Text</a></li><li><a href=/org/documents/epl-2.0/EPL-2.0.pdf>PDF</a></li><li><a href=/legal/epl-2.0/faq/>FAQ</a></li></ul></li><li class=menu-subgroup><a href=#legal-epl-10 data-toggle=collapse aria-expanded=false class=dropdown-toggle>EPL-1.0</a><ul class=collapse id=legal-epl-10><li><a href=/org/documents/epl-v10.php>About</a></li><li><a href=/org/documents/epl-v10.html>Plain HTML</a></li><li><a href=/org/documents/epl-1.0/EPL-1.0.txt>Plain Text</a></li><li><a href=/legal/epl/faq>FAQ</a></li></ul></li><li class=menu-subgroup><a href=#legal-licenses data-toggle=collapse aria-expanded=false class=dropdown-toggle>Licenses</a><ul class=collapse id=legal-licenses><li><a href=/legal/licenses#approved>Approved 3rd Party</a></li><li><a href=/legal/licenses#nonapproved>Non Approved</a></li><li><a href=/projects/handbook/#ip-copyright-headers>File Headers</a></li><li><a href=/legal/non-code-licenses>Docs & Examples</a></li></ul></li><li class=menu-subgroup><a href=#legal-specs data-toggle=collapse aria-expanded=false class=dropdown-toggle>Specifications</a><ul class=collapse id=legal-specs><li><a href=/projects/efsp/>Specifications Process</a></li><li><a href=/projects/efsp/operations.php>Specifications Operations</a></li><li><a href=/legal/efsl>Specification License</a></li><li><a href=/legal/tck>TCK License</a></li></ul></li></ul></li></ul></nav></aside></div><div class=col-md-18><div id=content></div><script async src=/public/js/generate-body-content.js type=text/javascript></script></div></main><aside class=featured-footer id=featured-footer><div class="eclipsefdn-featured-footer container-fluid" data-publish-target=eclipse_org><div class=row><div class="col-sm-24 featured-container"></div></div></div></aside><footer class=footer><div class=container><div class=footer-inner><section class=links-section><ul><li>Eclipse Foundation</li><li><ul><li><a href=https://www.eclipse.org/org/>About</a></li><li><a href=https://projects.eclipse.org/>Projects</a></li><li><a href=https://www.eclipse.org/collaborations/>Collaborations</a></li><li><a href=https://www.eclipse.org/membership/>Membership</a></li><li><a href=https://www.eclipse.org/sponsor/>Sponsor</a></li></ul></li></ul><ul><li>Legal</li><li><ul><li><a href=https://www.eclipse.org/legal/privacy/>Privacy Policy</a></li><li><a href=https://www.eclipse.org/legal/terms-of-use/>Terms of Use</a></li><li><a href=https://www.eclipse.org/legal/compliance/>Compliance</a></li><li><a href=https://www.eclipse.org/org/documents/Community_Code_of_Conduct.php>Code of Conduct</a></li><li><a href=https://www.eclipse.org/legal/>Legal Resources</a></li><li><button type=button class="btn btn-link toolbar-manage-cookies">Manage Cookies</button></li></ul></li></ul><ul><li>More</li><li><ul><li><a href=https://www.eclipse.org/security/>Report a Vulnerability</a></li><li><a href=https://status.eclipse.org/>Service Status</a></li><li><a href=https://www.eclipse.org/org/foundation/contact.php>Contact Us</a></li><li><a href=https://www.eclipse.org/projects/support/>Support</a></li></ul></li></ul></section><section class=social-media-section><p class="subheading text-tertiary">See what we're up to</p><ul class=social-media-list><li><a href=https://x.com/EclipseFdn aria-label=X><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
34
34
|
<i class="fa-brands fa-x-twitter fa-stack-1x fa-inverse" aria-hidden=true></i></span></a></li><li><a href=https://bsky.app/profile/eclipse.org aria-label=Bluesky><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
35
35
|
<i class="fa-brands fa-bluesky fa-stack-1x fa-inverse" aria-hidden=true></i></span></a></li><li><a href=https://mastodon.social/@EclipseFdn aria-label=Mastodon><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
36
36
|
<i class="fa-brands fa-mastodon fa-stack-1x fa-inverse" aria-hidden=true></i></span></a></li><li><a href=https://www.facebook.com/eclipse.org aria-label=Facebook><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
@@ -39,4 +39,4 @@ Manage cookies</a></li></ul></li></ul></div><div class="navigation-bar-ctas hidd
|
|
|
39
39
|
<i class="fa-brands fa-youtube fa-stack-1x fa-inverse" aria-hidden=true></i></span></a></li><li><a href=https://www.linkedin.com/company/eclipse-foundation aria-label=LinkedIn><span class=fa-stack><i class="fa-solid fa-circle fa-stack-2x" aria-hidden=true></i>
|
|
40
40
|
<i class="fa-brands fa-linkedin-in fa-stack-1x fa-inverse" aria-hidden=true></i></span></a></li></ul></section><section class=newsletter-section><p class="subheading text-tertiary">Stay up to date</p><h2>Subscribe to our newsletter</h2><form class="newsletter-form margin-top-40" id=mc-embedded-subscribe-form action="https://eclipse.us6.list-manage.com/subscribe/post?u=eaf9e1f06f194eadc66788a85&id=e7538485cd&f_id=00f9c2e1f0" method=post novalidate target=_blank><div class=text-field-outlined><input name=EMAIL type=email placeholder="Your email">
|
|
41
41
|
<button class=newsletter-form-submit type=submit name=subscribe id=mc-embedded-subscribe aria-label=Submit>
|
|
42
|
-
<i class="fa-solid fa-arrow-right" aria-hidden=true></i></button></div></form></section><section class=footer-bottom-section><img class="img-responsive logo" src=https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white.svg alt="Eclipse Foundation"><div class=legal-information><p>Copyright © Eclipse Foundation AISBL. All rights reserved.</p><ul class=legal-links><li><a href=https://www.eclipse.org/legal/privacy/>Privacy policy</a></li><li><a href=https://www.eclipse.org/legal/terms-of-use/>Terms of use</a></li><li><a href=https://www.eclipse.org/legal/compliance/>Compliance</a></li><li><a href=https://www.eclipse.org/legal/>Legal</a></li></ul></div></section></div></div></footer><div id=footer-js><script src="/public/js/main.js?v1.0?v=
|
|
42
|
+
<i class="fa-solid fa-arrow-right" aria-hidden=true></i></button></div></form></section><section class=footer-bottom-section><img class="img-responsive logo" src=https://www.eclipse.org/eclipse.org-common/themes/solstice/public/images/logo/eclipse-foundation-white.svg alt="Eclipse Foundation"><div class=legal-information><p>Copyright © Eclipse Foundation AISBL. All rights reserved.</p><ul class=legal-links><li><a href=https://www.eclipse.org/legal/privacy/>Privacy policy</a></li><li><a href=https://www.eclipse.org/legal/terms-of-use/>Terms of use</a></li><li><a href=https://www.eclipse.org/legal/compliance/>Compliance</a></li><li><a href=https://www.eclipse.org/legal/>Legal</a></li></ul></div></section></div></div></footer><div id=footer-js><script src="/public/js/main.js?v1.0?v=1766497060"></script><script>(function(){})(jQuery,document)</script></div></body></html>
|