| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | dynlib: fix initialize_symbols when there is no field for the handle in the ↵ | Laytan Laats | 2025-03-03 | 1 | -0/+5 |
| | | | | | struct | ||||
| * | fix not using RTLD_LOCAL on darwin | Laytan Laats | 2025-02-06 | 1 | -0/+2 |
| | | |||||
| * | dynlib: unload library before loading again & add LIBRARY_FILE_EXTENSION ↵ | Laytan Laats | 2024-11-28 | 5 | -18/+36 |
| | | | | | constant | ||||
| * | clean up dynlib and path/filepath with sys/posix | Laytan | 2024-10-28 | 4 | -21/+35 |
| | | |||||
| * | Moved all packages in core, base, vendor, tests and examples to use new #+ ↵ | Karl Zylinski | 2024-09-14 | 3 | -6/+6 |
| | | | | | file tag syntax. | ||||
| * | core: improve package doc comments for the documentation generator | Laytan Laats | 2024-09-03 | 1 | -2/+1 |
| | | |||||
| * | Remove implicit allocator usage in core:dynlib | Jeroen van Rijn | 2024-07-04 | 4 | -24/+14 |
| | | |||||
| * | Fixed some build tags in vendor libs | Andreas T Jonsson | 2024-05-13 | 1 | -1/+1 |
| | | |||||
| * | Merge pull request #3436 from karl-zylinski/fix-vet-unused-in-dynlib | Jeroen van Rijn | 2024-04-15 | 1 | -1/+1 |
| |\ | | | | | Fix for dynlib:initialize_symbols not passing -vet-unused | ||||
| | * | Fix for dynlib:initialize_symbols not passing -vet-unused | Karl Zylinski | 2024-04-15 | 1 | -1/+1 |
| | | | |||||
| * | | Fix the format of some `doc.odin` files of the `core` library which did not ↵ | Maurizio M. Gavioli | 2024-04-14 | 1 | -3/+2 |
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | made into the documentation. `c/frontend/tokenizer`: add proper "Example:" header to demo example code, removed empty lines. `container/bit_array`: moved comment before package; aligned narrative lines to left margin; converted case lines into bulleted lines ("- "); converted individual examples to single-tab-indented preformatted text. `dynlib`: removed "//+build ignore" line; added newline at EOF. `image/netpmb`: converted indented lines of "Reading", "Wrting" and "Some syntax..." into bulleted lists; "Formats" indented lines kept as they are as the preformatted text seems relevant to keep the alignments; doubly indented lines kept as single-indented to keep them different (as the format does not allow for two-level bulleted lists); removed empy lines. `os/os2`: WIP, not modified `sys/info`: removed "//+build ignore" line; converted tab-indented initial description into regular left-margin comment; moved uncommented sample code within the doc comment as an "Example:"; moved simple- and double-tabbed separate comments with sample Windows and macOS outputs within the doc comment as bulleted headlines with preformatted output listings; removed now empty comments and blank lines after the package line. `text/i18n`: removed "//+build ignore" line; moved the pacakge line at the end; de-indented the tab-indented introductory narrative; moved sample code comments into the doc comment as tab-indented code with a proper "Example:" heading; removed "```" MD attempts at code formatting. `text/table`: unindented the comment lines of a descriptive kind; headlines of major subdivisions are marked as bold; kept code samples as tab-indented preformatted text (as there are several of them, the standard "Example:" and "Output:" headings cannot be used) removing the "```" MD attempts at code formatting; removed in-between blank lines. | ||||
| * | Remove unneeded casts | gingerBill | 2024-02-06 | 1 | -2/+2 |
| | | |||||
| * | Clean up code for `initialize_symbols` | gingerBill | 2024-02-06 | 1 | -24/+17 |
| | | |||||
| * | Replace `core:*` to `base:*` where appropriate | gingerBill | 2024-01-28 | 2 | -3/+3 |
| | | |||||
| * | Add hot reload support to `dynlib.initialize_symbols` | Jeroen van Rijn | 2024-01-19 | 2 | -3/+20 |
| | | |||||
| * | dynlib: add last_error procedure | Laytan Laats | 2024-01-06 | 4 | -2/+33 |
| | | |||||
| * | Add bool return to `dynlib.initialize_symbols`. | Jeroen van Rijn | 2024-01-06 | 2 | -8/+7 |
| | | |||||
| * | Add `dynlib.initialize_symbols` (#3071) | Jeroen van Rijn | 2024-01-06 | 4 | -9/+139 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` package example import "core:dynlib" import "core:fmt" Symbols :: struct { // `foo_` is prefixed, so we look for the symbol `foo_add`. add: proc "c" (int, int) -> int, // We use the tag here to override the symbol to look for, namely `bar_sub`. sub: proc "c" (int, int) -> int `dynlib:"bar_sub"`, // Exported global (if exporting an i32, the type must be ^i32 because the symbol is a pointer to the export.) // If it's not a pointer or procedure type, we'll skip the struct field. hellope: ^i32, // Handle to free library. // We can have more than one of these so we can match symbols for more than one DLL with one struct. _my_lib_handle: dynlib.Library, } main :: proc() { sym: Symbols // Load symbols from `lib.dll` into Symbols struct. // Each struct field is prefixed with `foo_` before lookup in the DLL's symbol table. // The library's Handle (to unload) will be stored in `sym._my_lib_handle`. This way you can load multiple DLLs in one struct. count := dynlib.initialize_symbols(&sym, "lib.dll", "foo_", "_my_lib_handle") defer dynlib.unload_library(sym._my_lib_handle) fmt.printf("%v symbols loaded from lib.dll (%p).\n", count, sym._my_lib_handle) if count > 0 { fmt.println("42 + 42 =", sym.add(42, 42)) fmt.println("84 - 13 =", sym.sub(84, 13)) fmt.println("hellope =", sym.hellope^) } } ``` | ||||
| * | fixed dynlib wasm stub | Rehkitzdev | 2023-06-22 | 1 | -3/+3 |
| | | |||||
| * | Responded to PR review. Made dynlib return false on js instead of panic | Dragos Popescu | 2023-03-20 | 1 | -3/+3 |
| | | |||||
| * | Made most libraries panic on js targets instead of not compiling | Dragos Popescu | 2023-03-20 | 1 | -0/+15 |
| | | |||||
| * | Merge pull request #2360 from Lperlind/documentation/dynlib | gingerBill | 2023-03-02 | 2 | -2/+88 |
| |\ | | | | | Document core:dynlib | ||||
| | * | Document core:dynlib | Lucas Perlind | 2023-03-02 | 2 | -2/+88 |
| | | | |||||
| * | | Add `runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD` where appropriate | gingerBill | 2023-02-10 | 1 | -0/+3 |
| |/ | |||||
| * | Add `#optional_ok` to `dynlib.symbol_address` | gingerBill | 2022-05-25 | 1 | -1/+1 |
| | | |||||
| * | Fix lib_unix.odin | gingerBill | 2022-05-25 | 1 | -2/+2 |
| | | |||||
| * | Make `core:dynlib` use the private interface convention of other packages | gingerBill | 2022-05-25 | 3 | -18/+32 |
| | | |||||
| * | initial OpenBSD support | Sébastien Marie | 2022-02-25 | 1 | -1/+1 |
| | | |||||
| * | Strip semicolons in core which were missing | gingerBill | 2021-09-08 | 1 | -8/+8 |
| | | |||||
| * | Remove unneeded semicolons from the core library | gingerBill | 2021-08-31 | 2 | -10/+10 |
| | | |||||
| * | Remove `#opaque` usage in core library | gingerBill | 2021-02-23 | 1 | -1/+1 |
| | | |||||
| * | Deprecate `opaque` in favour of `#opaque` in the core library | gingerBill | 2020-12-04 | 1 | -1/+1 |
| | | |||||
| * | Remove usage of `do` in core library | gingerBill | 2020-09-23 | 1 | -1/+3 |
| | | |||||
| * | Get Odin compiling and produced exe's running on FreeBSD | Christian Seibold | 2020-09-14 | 1 | -2/+2 |
| | | |||||
| * | Begin migration from sys/win32 to sys/windows | gingerBill | 2020-06-26 | 1 | -4/+4 |
| | | |||||
| * | Implement dynlib core library for unix/darwin; not 100% about the build tags | Scitoshi Nakayobro | 2019-12-30 | 2 | -0/+22 |
| | | |||||
| * | Fix core library for the new procedure parameter addressing mode | gingerBill | 2019-07-15 | 1 | -1/+1 |
| | | |||||
| * | Fix -vet for demo.odin | gingerBill | 2019-03-30 | 1 | -1/+1 |
| | | |||||
| * | package dynlib | gingerBill | 2019-03-03 | 2 | -0/+27 |